LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-04-2013, 12:22 AM   #1
Alpha90
Member
 
Registered: Jul 2012
Posts: 97

Rep: Reputation: Disabled
Question about modifying file permission which differ from the system-wide umask


I have a umask set at 027 for alittle increased security. However for alittle extra security and to clean up the ls color output I was looking into modifying my non executable data directories and files such as a Documents directory to the file permissions of 640. However if i user chmod and do something like chmod 640 ~/Documents followed by a cd or ls of Documents I will get a message saying cd: Documents: Permission denied when I still own the directory and my user and group has read privlage. I am sure this has something to do with umask but I do not know what. Does anyone know why this occures ?
 
Old 08-04-2013, 12:31 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
I got a refresher looking this up... thanks...

Found a note I left for myself:

Quote:
Directory attributes have different meanings than files, related to how the inode is handled.

Read allows access to directory contents.
Write allows file creation in a directory.
Execute allows traversal (i.e., search, see below) of the directory.
And from chmod man page:
Quote:
The letters rwxXst select file mode bits for the affected users: read (r), write (w), execute (or search for directories) (x), execute/search only if the file is a directory or already has execute permission for some user (X)
When you think about it, you cannot "read", "write" or "execute" a directory - so the attribute bits are put to better use.

Last edited by unSpawn; 08-04-2013 at 07:28 AM. Reason: //post mgmt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Umask Permission Question sublime188 Linux - Newbie 3 02-08-2011 08:52 AM
umask and default file permission cool9292 Linux - Newbie 2 03-10-2006 07:03 PM
Modifying system-wide search path kaplan71 SUSE / openSUSE 2 01-05-2006 08:38 PM
System Wide Permission lmanwarren Linux - General 1 03-29-2005 08:15 PM
Modifying system-wide include path in Fedora Ross Clement Fedora 0 02-21-2004 03:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration