LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-22-2009, 08:09 PM   #1
saagar
Member
 
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 08:11 PM.
 
Old 05-22-2009, 08:31 PM   #2
billymayday
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, 09:23 PM   #3
saagar
Member
 
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...
 
  


Reply



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 10:32 AM
A Query related to Git? your_shadow03 Linux - Newbie 10 04-23-2009 11:35 PM
Query related to sudo? your_shadow03 Linux - Newbie 2 04-22-2009 12:21 AM
shell related query !!!!!!!!!!! iacharyya Linux - General 10 06-09-2008 06:39 PM
One query related libstdc++.so.5 utkarshrawat Linux - Newbie 2 05-27-2008 02:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:57 AM.

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