LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-01-2004, 06:48 PM   #1
unimaginative
Member
 
Registered: Aug 2003
Location: USA
Distribution: SuSE 8.2 Professional
Posts: 159

Rep: Reputation: 30
chmod possible problem


okay, im no pro at this and i am really just learning the shell but I want to create a netscape installation in /opt/netscape the installer won't let me long in as root and I don't have default write permissions so i typed
cd /opt
su
(my password)
chmod +w netscape
ls -l
,but my permissions said
drwxr-xr-x
shouldn't it say:
drwxrwxrwx
someone please tell me my error
 
Old 01-01-2004, 06:58 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
no it shouldn't say drwxrwxrwx because your only telling chmod to give write permission to the user, which when you type it is root...
if you wanted all people to have +w then you would have to type chmod a+w rather than just +w, and btw the [a] stands for all...
if you just wanted a normal user to have write access you would type chmod g+w as root user, and for other it would be chmod o+x ...
just remember the following
Code:
u = user
g = group
o = other
a = ugo
hope i didn't confuse ya ;-)

Last edited by DrOzz; 01-01-2004 at 06:59 PM.
 
Old 01-01-2004, 07:02 PM   #3
unimaginative
Member
 
Registered: Aug 2003
Location: USA
Distribution: SuSE 8.2 Professional
Posts: 159

Original Poster
Rep: Reputation: 30
oh, I get it, thank you
 
Old 01-01-2004, 07:09 PM   #4
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
not a problem
 
Old 01-01-2004, 07:28 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 252Reputation: 252Reputation: 252
Its easier for me to remember the numbering scheme:

Read = 4
Write = 2
Execute = 1

You will see your listings as -rwxrwxrwx and as stated above, each block of rwx = user, group or everyone.

So the first rwx = User
Second one = Group
And last block = Everyone

So if you wanted to make the file or directory rwx for everyone, you would do a:

chmod 777 <filename>

Cause when you add them up, 4 + 2 + 1 = 7

If you wanted just the user to have full access but everyone else to have read only access, you would do this:

chmod 744 <filename>

And the ls -al output of it would look like this:

-rwxr--r-- <filename>

When you see a - in the front, its just a file. If you see a d, its a directory and an l is a link and so on.

Hope this sheds some light on chmod. You can read more by reading the man pages on it.

man chmod
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chmod problem with proftpd kwickcut Mandriva 3 02-14-2005 12:36 AM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 09:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 06:37 AM
CHMOD problem michn77 Linux - Newbie 0 02-12-2004 06:15 AM
chmod problem face_master Linux - General 34 01-28-2003 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration