LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to fix file and directory permissions (https://www.linuxquestions.org/questions/linux-general-1/how-to-fix-file-and-directory-permissions-342752/)

asif mushtaq 07-13-2005 05:51 AM

how to fix file and directory permissions
 
Is there anyway in linux to fix the permissions for files and directories. What i mean is that let's say i want any file created to have 2775 permissions assciated with it no matter where and who created the file. Is there a way?

fiero 07-13-2005 08:09 AM

You cannot untill you get the write permission to all the directories in the root ( / ).
Once you have write permission, you can change the file creation mask setting.

$umask 5002

Then any file u create will have the permission ! (5002) i.e logical not of ( 5002 ).

Try it then come back.

asif mushtaq 07-13-2005 11:51 PM

Thanks for your comment. I have already tried the umask thing but the problem with the it is that it doesn't fixes the permissions but rather specifies which permissions are allowed and which are not.
For example if i set umask to 5002 then any permissions could be set except write permission for "others" and "suid" and "sticky bit" permissions. This makes for example 2550 perfectly acceptable.
What i need is a way of totally fix the permissions so that what i specify is what will be set for every folder or file and nobody could change it.


All times are GMT -5. The time now is 07:49 PM.