Results 1 to 8 of 8
dear all
im trying to find out how is the file permission is defined?
for example when i use the command
list -l testp01.txt
i get the result of testp01.txt ...
- 01-18-2010 #1Just Joined!
- Join Date
- Jan 2010
- Posts
- 5
file permission
dear all
im trying to find out how is the file permission is defined?
for example when i use the command
list -l testp01.txt
i get the result of testp01.txt file permission -rw- r-- r-- root root etc
however i wonder where are those information written?
is there any special file which contains all of these information?
--
- 01-18-2010 #2
If I remember correctly. The permisions are kept in the inode. inode - Wikipedia, the free encyclopedia
There is no file which contains this info, because it exists on a level lower than the filesystem.
You have a hardware disk (hard drive) that is partitioned into spaces (partitions) that are either allocated to raid, lvm or the like, or have filesystems written to them (such as EXT2/3/4, NTFS, FAT, etc.) Files are then written on top of the filesystem. Permisions exist as part of the EXT2/3/4 stage, and are lower than Files.New to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 01-18-2010 #3Just Joined!
- Join Date
- Jan 2010
- Posts
- 5
dear all
what I've studied turn out that umask is able to set the default permission of each user.
however I've no idea how to use 'umask'.
do you have any suggestion?
thank you very much
- 01-18-2010 #4
did you google for umask?
there is also
umask --help
and
man umask
and
info umaskNew to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 01-18-2010 #5Just Joined!
- Join Date
- Jan 2010
- Posts
- 5
dear all
I've been able to use umask to control the file default permission
however whenever I use umask command, which file's information is changed?
I mean I want to find out which configuration file and which information are used together with umask
thank you very much
- 01-18-2010 #6Just Joined!
- Join Date
- Jan 2010
- Posts
- 5
Dear all
I found out that the umask can be set from the /etc/csh.cshrc and /ect/csh.login
I've tried but failed
do you have any suggestion?
thank you very much
- 01-18-2010 #7
I don't know exactly where the user's present umask is stored, but you can set it automatically for a user everytime that he logs in by adding it to his shell's resource file.
It looks like you tried to use the resource file for csh: are you using csh? Run the command:
This will tell you the shell that you are using. Unless you have changed it, the value will probably be /bin/bash. This means you are using the Bash shell.Code:echo $SHELL
In this case, you can set a user's umask automatically by changing their /home/user/.bashrc file. This file is loaded by Bash whenever it starts, and is just a simple shell script. Therefore, to set a user's umask to 0660, just add the line:
to their /home/user/.bashrc.Code:umask 0660
Does this help?DISTRO=Arch
Registered Linux User #388732
- 01-19-2010 #8Just Joined!
- Join Date
- Jan 2010
- Posts
- 5
thanks cabhan
I've got what I want


Reply With Quote