LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Folder/File permission inheritance. (https://www.linuxquestions.org/questions/linux-newbie-8/folder-file-permission-inheritance-4175444487/)

mikhail91 01-07-2013 06:56 AM

Folder/File permission inheritance.
 
hello everyone, I'm quite new to Linux and I've been given the following assignment.

I have to recreate a windows like folder structure that looks like this

Documents and Settings
|
My Documents
My pictures

I have to set the permissions for each subfolder to give the user and the group read and write access. but I also want any new folders/files created within this structure to inherit the same permissions as their parent folder. even when I create one as a Sudo user.
I can get it to work when a normal user creates a file within this structure, but not when I do it with Sudo.

I'm pretty sure I've missed something really small and any help on this subject is greatly appreciated.

Thanks in advance,

Mikhail.

pan64 01-07-2013 07:07 AM

in unix/linux, all the permissions set by the current/actual environment and user, nothing is inherited. See the man page of umask.


All times are GMT -5. The time now is 03:06 PM.