cancel
Showing results for 
Search instead for 
Did you mean: 

File Permission

 
SOLVED
Go to solution
Highlighted
Amdy_Sufiyan
Occasional Contributor

File Permission

what if user initially didn't give rwx permission to himself.

2 REPLIES 2
Highlighted
Bill Hassell
Honored Contributor
Solution

Re: File Permission

The simple answer is to use chmod. However, missing from your question is how the user was able to create a file without rwx permissions. When a user creates a file using vi or cp or touch or even file redirection, the setting for umask defines the initial mode for the file. In a new system where the (very bad) default for umask is 00, files will be created as -rw-rw-rw. NOTE: files should never be set to rwx UNLESS the file is a script (ksh, sh, perl, awk, etc). You do not want the x bit set on simple data files. If umask is 022, then permissions will default to -rw-r--r--

 

If the user does not own the file, then the permissions (chmod) cannot be changed. Only the owner can modify the permissions.



Bill Hassell, sysadmin
Highlighted
Amdy_Sufiyan
Occasional Contributor

Re: File Permission

Thanx....
:)