Have noticed a lot of paths with permissions of 775.
So, I went to a path that was 755, added a new sub path, and it was made permissions of 775.
There does not seem to be a permissions inheritance in place ??
Have noticed a lot of paths with permissions of 775.
So, I went to a path that was 755, added a new sub path, and it was made permissions of 775.
There does not seem to be a permissions inheritance in place ??
The permissions normally don't get inherited from the parent (set-group-ID and set-user-ID being exceptions on directories). Look what the output of 'umask' is. That would define the default permissions for newly created files and directories.
Okay thanks, here is the output of umask ..
Does that look right ?Code:$ umask 0002
EDIT: It seems that the default permissions changed in 12.04, see this post
How do I change the default permissions ?
Last edited by oygle; February 9th, 2013 at 05:24 AM.
Considering the informative post by "Morbius1" here, a snippet ..
and the "umask" value I have is 0002.On Linux Filesystems
At the moment of birth every file has permissions of 666 and every directory has permissions of 777. A system wide umask is created to modify these permissions immediately after birth and it's currently set at 002. So when you create a new file it's permissions are:
666
002 <-- minus the umask
==
664
And every new directory has permissions of:
777
002 <-- minus the umask
==
775
Now it all makes sense, because my files are defaulting to 664, and paths are defaulting to 775
This change was made in *Ubuntu some time ago.
How do I change the umask to a value of 0022 , so that I get ..
Files 644
Folders 755
Oygle
Well, if you want to change the default only for one user then put umask 022 into ~/.bash_profile, ~/.bashrc or some other shell start-up file for that user.
For changing the system-wide default, put a short script that containsinto the directory /etc/profile.d. Name it, say umask.sh. This way, it'll override the umask set either in /etc/profile or in /etc/login.defs, but won't interfere with other things in those files.Code:umask 022
Sure, you're free to directly change the default setting in /etc/login.defs instead, but I guess then this file won't get updated automatically with the rest of the system.
Bookmarks