LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-08-2003, 11:54 PM   #1
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Rep: Reputation: 30
File Permissions?


hey guys

im having some trouble understanding the file permision stuff like when you do the ls command in the shell you get stuff like :

-rw-------
drwxr-xr-x
-rw-rw-r--
-rw-------

if anyone can clear some of that stuff up for me that would be great
 
Old 12-09-2003, 12:16 AM   #2
stuNNed
Member
 
Registered: Aug 2003
Distribution: Gentoo/Ubuntu
Posts: 134

Rep: Reputation: 15
the 1st 3 is for owner:

rwx -- r stands for read, w for write, x for execute

the 2nd 3 are for group

the 3rd set of 3 are for other or world

the one with d means it's a directory
 
Old 12-09-2003, 12:23 AM   #3
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
r = read
w = write
x = execute

first dot: type of file (d = directory)

Then, divided in 3 sections of 3 dots

owner, group, others

therefore, in your example 1, owner can read/write, group and others have no permission.

in your example 2, the file is a directory,

owner has all permissions
group has only read - execute
others have read -execute

However, permissions on directoy are complicated. I can't treat them here.
hope this helps
 
Old 12-09-2003, 07:38 AM   #4
jeempc
Member
 
Registered: Mar 2003
Location: Ann Arbor, MI
Distribution: Slackware 10.1
Posts: 119

Rep: Reputation: 15
chmod

Look up the chmod command. That is how you change permisions.

ex. chmod a+x filename
That means members of the group can read the file.

If you are used to dos, chmod is like the arrtib command.
Jeempc
 
Old 12-09-2003, 07:39 AM   #5
jeempc
Member
 
Registered: Mar 2003
Location: Ann Arbor, MI
Distribution: Slackware 10.1
Posts: 119

Rep: Reputation: 15
oops

chmod g+x means the group can read the file

chmod a+x means all can execute the file
...
 
Old 12-09-2003, 07:52 AM   #6
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
Re: oops

Quote:
Originally posted by jeempc
chmod g+x means the group can read the file

chmod a+x means all can execute the file
...
You made a mistake...

chmod g+x means the group can execute the file... not read it.
 
Old 12-09-2003, 07:53 AM   #7
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
Re: chmod

Quote:
Originally posted by jeempc
Look up the chmod command. That is how you change permisions.

ex. chmod a+x filename
That means members of the group can read the file.

If you are used to dos, chmod is like the arrtib command.
Jeempc
You made a mistake, chmod a+x means all can execute the file, not group can read the file...
 
Old 12-09-2003, 10:18 AM   #8
jeempc
Member
 
Registered: Mar 2003
Location: Ann Arbor, MI
Distribution: Slackware 10.1
Posts: 119

Rep: Reputation: 15
Sorry for all the confusion. I will preview posts first. I caught another mistake

The dos command is attrib not atrrib

Thanks for the corrections.
J
 
Old 12-09-2003, 05:14 PM   #9
fieldmethods
Member
 
Registered: Nov 2002
Location: Maryland
Distribution: redhat 9
Posts: 31

Rep: Reputation: 15
Post A link to further information on file permissions

Longinus,

Try this page:

http://www.linuxman.com.cy/rute/node17.html

It's from an online book called "Rute Linux," which is very useful, and in my experience, often more accessible than going straight to the man pages.

Good luck!

-Pat
 
Old 12-10-2003, 09:43 PM   #10
Longinus
Member
 
Registered: Sep 2003
Distribution: Redhat 9.0 && Slackware 9.1
Posts: 420

Original Poster
Rep: Reputation: 30
thanks guys for all the help i think i have a better understading now
 
  


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
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM
CVS - file permissions and file ownership Osten Linux - Software 3 01-18-2004 04:08 PM
file permissions and file owner won't change Nadim Slackware 5 11-29-2003 06:03 PM
Changing file permissions on a SAMBA file share apenney Linux - Software 0 02-11-2002 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:54 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