LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-28-2004, 06:34 PM   #1
Smokey
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 313

Rep: Reputation: 30
messed up permissions


Hi, I messed up my images folder and now I can't view any files in it.

I did this as root

chmod -R 777 /home/smokey/images

But xv wont work when I try to launch pictures inside of it. What is the correct permissions so that I can view it and not make it an "executable", what do I type? as root or normal user?
 
Old 10-28-2004, 08:30 PM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
hi ,

i think that should be : chmod 660......etc ( rw-rw---- )

egag
 
Old 10-28-2004, 08:44 PM   #3
Nichole_knc
Member
 
Registered: Mar 2004
Location: Georgia
Distribution: SlackWare 10.1+, FreeBSD 4.4-5.2, Amiga 1.3,2.1,3.1, Windors XP Pro (makes a fair answering machine)
Posts: 287

Rep: Reputation: 30
Directory should be 755
Individual picture files should be 744
and it should be set to chown "username":users for directory and files.
 
Old 10-29-2004, 04:13 AM   #4
Cerbere
Member
 
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799

Rep: Reputation: 33
Quote:
Originally posted by Nichole_knc
Directory should be 755
Individual picture files should be 744
and it should be set to chown "username":users for directory and files.
Close, but not quite.

The individual picture files should be 644

The 3 digits refer to the permissions for the owner of the file, all users in the same group as the owner, and finally all other users. Each digit is obtained by adding the following:

1 for executable permission
2 for write permission
4 for read permission

So, if you don't want your pictures to be executable then you set it to 6 for the owner, which allows the owner to (4) read the file, plus (2) write the file. You set it to 4 for other users in the same group, and 4 for all other users to allow them to only read the file.

The permissions are slightly different for directories, so you have to make directories executable (in a sense) in order to allow the owner and others to browse within them. This means that you'll have to set the permissions for the files within each directory with the following command:

chmod 644 * (assuming there are no other files in the directory which should be executable)

Rather than using the '-R' flag from the parent directory.

In addition there are other properties which can be set through the permissions, but these aren't really relevant to this discussion, so I'll leave that as an exercise for the reader ;-)

Enjoy!
--- Cerbere

[edit] Granting write permission implies permission to edit or delete the file or directory. [/edit]

Last edited by Cerbere; 10-29-2004 at 04:15 AM.
 
Old 10-29-2004, 05:12 AM   #5
jazzyjazz
Member
 
Registered: Oct 2003
Location: Brussels
Distribution: Slackware-current
Posts: 42

Rep: Reputation: 15
you can also chmod like this

chmod o=rwx or g=rwx or o=rwx

o = owner
g = users
o = others

rwx meaning goes quite for itself i think
 
Old 10-29-2004, 12:17 PM   #6
George666
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 63

Rep: Reputation: 15
Quote:
Originally posted by jazzyjazz
you can also chmod like this

chmod o=rwx or g=rwx or o=rwx

o = owner
g = users
o = others

rwx meaning goes quite for itself i think
Close, but it is like this :

chmod u=rwx or g=rwx or o=rwx or a=rwx

u = user who owns the file
g = users in the same group as the file
o = other users
a = ugo together

You can also use + and - :

chmod a+x filename will make a file executable for everybody

Last edited by George666; 10-29-2004 at 12:35 PM.
 
  


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
I messed up with permissions mfrangos79 Linux - Security 4 07-20-2005 08:58 PM
I messed up my / permissions np complete Linux - General 4 10-29-2004 08:17 AM
su permissions messed up ceph Linux - General 1 09-08-2004 11:54 PM
Messed up my permissions usercsr Slackware 7 07-08-2004 11:21 AM
I think I messed up my permissions... jeffreybluml Linux - Newbie 4 03-25-2004 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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