LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting permissions once and for all? (https://www.linuxquestions.org/questions/linux-newbie-8/setting-permissions-once-and-for-all-431716/)

zener 04-04-2006 03:39 PM

Setting permissions once and for all?
 
Is there a way to determine default permissions to files/directories I can create recursively without having to change them manually afterwards?

jschiwal 04-04-2006 04:22 PM

Some corrections.
 
Use the "umask" built-in command in your ~/.bash_login or ~/.bash_profile configuration. This setup file is run when you first log in, so every konsole or program you start subsequently will inherit the value.

For some filesystems, like VFAT, the permissions are set for the entire partition when it is mounted and can't be changed. In that case, you need to change the value in the /etc/fstab file.

zener 04-05-2006 04:15 AM

Sorry for beinf cliche, but how do I configure the bash login or profile configuration from the terminal. I just want these settings to apply for a specific user, not for everyone

jschiwal 04-05-2006 05:01 AM

First of all, I used ~/.profile. It should be ~/.bash_profile or ~/.bash_login. Whichever exists currently should be OK.
Use the "umask" built in command. Check the output of "help umask" for more info.
Note the "~" character. It expands to the home page of the person typing it.
Suppose that you have a user "nelson", ~nelson/.bash_profile will be that persons personal profile setup file.


All times are GMT -5. The time now is 09:27 AM.