8
I'm trying to change the permissions of temp_dir to 777. Why are these commands not accomplishing that? I'm using Linux by the way.
kylefoley@kfoley76:/mnt/disks$ chmod 777 /mnt/disks/temp_dir
kylefoley@kfoley76:/mnt/disks$ stat -c "%a %n" temp_dir
755 temp_dir
I also tried the verbose switch
kylefoley@kfoley76:/mnt/disks$ chmod -v 777 /mnt/disks/temp_dir
mode of '/mnt/disks/temp_dir' changed from 0755 (rwxr-xr-x) to 0777 (rwxrwxrwx)
kylefoley@kfoley76:/mnt/disks$ stat -c "%a %n" temp_dir
755 temp_dir
I also don't understand why I can't use sudo
kylefoley@kfoley76:/mnt/disks/temp_dir$ sudo chmod 777 fix_mistakes
chmod: cannot access 'fix_mistakes': Permission denied
Even when I log in as root user
kylefoley@kfoley76:/mnt/disks/temp_dir$ sudo -i
root@kfoley76:~# sudo chmod 777 /mnt/disks/temp_dir
chmod: cannot access '/mnt/disks/temp_dir': Permission denied
I should also add that this bug must have something to do with the fact that the directory in question is a gcsfuse mounted disk, available from gcloud. Other attempts to change permissions worked fine:
kylefoley@kfoley76:~$ mkdir hey
kylefoley@kfoley76:~$ stat -c "%a %n" hey
755 hey
kylefoley@kfoley76:~$ chmod 777 hey
kylefoley@kfoley76:~$ stat -c "%a %n" hey
777 hey
1Please post what
umask
outputs. – gronostaj – 2020-02-07T07:11:37.5971deduction1 on /mnt/disks/temp_dir type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1001,default_permissions) – kylefoley76 – 2020-02-07T07:39:07.313
1that was the umask output – kylefoley76 – 2020-02-07T07:39:15.873
3Note that
chmod 777
should never be run. The number of circumstances where world writability does not seriously damage the UNIX security model (particularly given existence of accounts likenobody
used to sandbox execution of untrusted code) are very few. – Charles Duffy – 2020-02-07T16:13:28.690well, i have such a difficult time determining whether or not i am the owner of the file. – kylefoley76 – 2020-02-08T07:18:57.617