The small linux problem thread

so i went back to gdisk…
and just decided to write again without changing anything…

Command (? for help): w
Warning! Secondary header is placed too early on the disk! Do you want to
correct this problem? (Y/N): y
Have moved second header and partition table to correct location.

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y

that fixed the issue… i was able to grow the partition afterwards…

GPT fdisk (gdisk) version 1.0.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 1310720000 sectors, 625.0 GiB
Model: QEMU HARDDISK   
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 9CF54259-EF78-4238-A345-3402654C4D00
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1310719966
Partitions will be aligned on 2048-sector boundaries
Total free space is 10485693 sectors (5.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048      1300236287   620.0 GiB   8E00  Linux LVM
1 Like

Maybe a partprobe was needed?

nope…
tried rebooting
tried rescan scsi bus
tried echo 1 > /sys/class/block/sdb/device/rescan

the last usable sector didnt change until doing the above write

1 Like

This happens to me everytime I use gdisk after extending the virtual hard disk. For some reason you have to do it twice…

2 Likes

Any advice on how to force a group and mode to be used when a samba user creates a file or directory?

For example, you have appAdmin and tenanAdmin who are samba users. There is also a global_group. Both appAdmin and tenant admin are in globacl_group.

I’m not certain what I should use to make mode 775 and group permissions for all directories and files created by these users. Part of thinks it’s sticky bits another thinks its samba configs.

Any advice is appreciated.

Respectfully,

cotton

set gid
and umask

In windows there is inheritance, is there a way to enforce set gid recursively on all directories when they are created.

For example ./coolFolder (770 bestUser:bestGroup)

then 5 days later someone inside of ./cooFolder runs mkdir coolerFolder…

can that enforce the sticky bit set on coolFolder to inherit into the newly created folders and files?

image

1 Like

Lol! I get you, but there’s really no better way to put what I want.

I just set a sticky bit with chmod g+s on a directory located above it and it uses “inheritance” to handle the group permissions.

Believe me it hurt me too to bring that into this thread.

create mask = 0664
directory mask = 0775
force group = group

In smb.conf

And yeah, I think g+s can work in place of force group but I don’t remember.

I also think it was mode but now it’s mask? I’ll have to look. On mobile rn. It’s pretty trivial to configure though.

Yeah it’s mask which is confusing because it does behave as a mode, not a mask, but whatever.

2 Likes

I know a few tools like rsync can sneak past and break it, I certainly haven’t tried it with Samba specifically… but Linux ACLs generally do what you want:

 # Force newly created FOLDERS to inherit the same settings
 setfacl -m d:g:$USER_GROUP:rwx,g:$USER_GROUP:rw,d:o::---,o::--- $FOLDER
1 Like

Is there a way to enforce this behavior on subdirectories after they’ve been created?

In other words, after creating a folder structure can you set a sticky bit on a parent folder and have that propagate to the children folders, without deleting and recreating the folders?

1 Like

chmod -R g+s should do it?

I’ll check real quick, but I think that only sets the permissions correctly for newly created folders within the parent. I’m wondering if I can run a command like that and it update the folders that have already been created within the parent.

Assume I have already created the following directory tree:

/
  cool/
    innerCool/
      genericFolder/  # <---here
        purposefulFolder/
          spotOne/
          spotTwo/
        purposefulFolder2/
          spotThree/
          spotFour/
          spotFive/

After creating that I run

chmod -R 770 /cool/InnerCool/genericFolder
chown -R specialUser:specialGroup /cool/InnerCool/genericFolder

However, now I need to set the sticky bit for the group from /cool/InnerCool/genericFolder down after the subFolders have been created.

I could issue:

chmod g+s /cool/InnerCool/genericFolder

However, that will not affect the current folders already created, which I need to update. I would prefer to not have to delete them and recreate them because that might be painful.

Any way around that?

Oh yeah sorry, you should chgrp -R group and then chmod -R g+s

Okay. Thanks! I’ll have to test that, but this may help me survive this debacle. I’ll let you know what comes from this.

cotton

1 Like

That’s how I have my shares setup and it’s always worked fine so long as you have a dedicated group per share.

1 Like

found my solution

Is there anyway to organize the GNOME app drawer? (Sorry I don’t know a better word for it.) It’s a completely disorganized mess, and one of the reasons I dislike GNOME. But GNOME currently is the only stable desktop I can find on Fedora 33. XFCE and Cinammon keep crashing on me.

So are there any GNOME utilities/tweaks for managing this chaos?

Are you talking about grouping applications? If so, stock the intention is that you would type to search.

If you don’t mind using a menu system like Ms Windows 7 and prior, check the gnome extensions page.
https://extensions.gnome.org/

I am on an MS Windows PC at work, but I believe the extension is called “Applications Menu” and is installed stock, but not turned on in the Tweaks menu. You can use gconf2 to organize things where you actually want them to be and ignore their meta tags.

2 Likes