garden2.jpg
File Permissions

Default permission:

Disclaimer: Apply to a TEST environment first. Use on production systems is at DBAs own risk.

Files 666 rw-|rw-|rw-

Dirs 777 rwx|rwx|rwx

r=4 w=2 x=1

ex1: all for owner, read for group, read to others:

(4+2+1) , 4 , 4

744 :rwx|r–|r—

ex2: all for all users: 4+2+1

777 :rwx|rwx|rwx

ex3: all to owner, read & execute to group, nothing to others:

(4+2+1), (4+1), 0

750 :rwx|r-x|—

ex4: read write to owner, nothing to group, nothing to others:

(4+2), 0 0

600 :rw-|—|—

umask:

Ex1: if you type umask you should get a number like 022 for example:

022 would mean that our default permissions are:

022 means withhold w=2 (write) from group and others:

files: 644 è rw-|r–|r–

dirs: 755 è rwx|r-x|r-x

This means that every file created on this system would have this default

Ex2: To change the umask to 044 for all users go to your /etc/profile and add

umask 044

044 means withhold r=4 (read) from group and others.

Files: 622 à rw-|-w-|-w-

Dirs: 733 à rwx|-wx|-wx

Ex3: To change the umask to 02 for a given user go to $HOME for this user and insert umask 02 to .profile file.

02 means withhold write permissions w=2 from others.

Files: 664 à rw-|rw-|r—

Dirs: 775 à rwx|rwx|r-x

Latest Blog Items

email

Thank you for your interest in idbasolutions.

Contact us using this email: contact.us@idbasolutions.com