Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-22-2009, 09:09 PM   #1
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Rep: Reputation: 37
Query related to setting permissions in RHEL5

I have 2 doubts regarding setting permissions:

Query no.1:

[root@station1~]#ls -ld /testdir
drwx------ 2 sam sales 4096 May 22 14:08 /testdir

[root@station1~]#chmod u=rwx,g=r-x,o=r-x /testdir
[root@station1~]#ls -ld /testdir
drwxr--r-- sam sales 4096 May 22 14:08 /testdir

Please let me know why it is happening...

it should be drwxr-xr-x, is it not?...
but if I do it in the numeric way it is working fine...also if i do like the following it works fine:

chmod u+rwx,g+rx,o+rx /testdir.

QUERY no.2

When I create a file in CLI mode its default permissions are 644, but when I create a file with gedit in GUI mode it is 600. Why is it this way???

Thank you.

Last edited by saagar; 05-22-2009 at 09:11 PM.
Old 05-22-2009, 09:31 PM   #2
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No, the dash means write (w) permissions are not set, so you have added read permissions and removed execute (x)

try chmod u=wrx,g=rx,o=rx /tesdir
Old 05-22-2009, 10:23 PM   #3
Registered: Jul 2008
Location: Chennai, India
Distribution: RHEL5, Ubuntu
Posts: 191

Original Poster
Rep: Reputation: 37
thanks a lot. Please have a look at my 2nd query too...


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
Query related to syslog? your_shadow03 Linux - Newbie 5 05-15-2009 11:32 AM
A Query related to Git? your_shadow03 Linux - Newbie 10 04-24-2009 12:35 AM
Query related to sudo? your_shadow03 Linux - Newbie 2 04-22-2009 01:21 AM
shell related query !!!!!!!!!!! iacharyya Linux - General 10 06-09-2008 07:39 PM
One query related utkarshrawat Linux - Newbie 2 05-27-2008 03:01 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:49 PM.

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