LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-29-2007, 07:07 PM   #1
Cichlid
Member
 
Registered: Jan 2002
Location: Montreal
Distribution: Ubuntu 8.10
Posts: 178

Rep: Reputation: 30
Why do the permissions not work?


Hi All,

I'm not sure what is going on here. I don't think it is my distro necessarily, I'm running Ubuntu 7.04. As my user (we'll say james) I created a directory in /home called /home/common. This directory is owned by james and is in the group users. Both user james and ann are default members of users.

I ran the command 'sudo chmod -R 660' for the results of giving the owner and group members read and write permission and nothing to others.

Well, as my user, james, I tried to change to the common directory and I get access denied??? I do not understand. I even double checked that I was a member of users and I am. It is the default group!

Can someone shed some light on this please.

Thanks
 
Old 04-29-2007, 07:43 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
I believe you need to give "execute" permissions to traverse/enter a directory. That may not be the correct terminology, but give both the owner and group execute permission on the directory:
Code:
sudo chmod ug+x /home/common
You'll need to do that for any subdirectories inside /home/common as well. The following command will do that:
Code:
sudo find /home/common -type d -exec chmod ug+x {} \;
Also, if you added or changed any user's group or initial group, I strongly recommend you log out completely of any terminals or GUI environment that the modified user(s) are currently logged into. That will make sure the modifications are "flushed" through the system so to speak.

You might also be interested in setting the "sticky bit" for the directory. Do a Google search on it for information, but the basic idea is this: a directory with the sticky bit set allows users to create files in a shared directory, but only the file's creator can delete the file. Like I said, you mgiht be interested in that... maybe not. Thought I'd throw it out there.
 
Old 04-29-2007, 08:43 PM   #3
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Exactly: 660 is read-write permissions only:

4=read
2=write
1=execute

You do need the execute permissions.

The numbers add up, so 6= 4 (read) + 2(write). If you also need execute permissions, add 1. Result: chmod -R 770.

Which is just another way of doing what Dark Helmet suggested.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
svgalib IO permissions, will wireless work on this old laptop? sniff Slackware 4 01-27-2006 02:07 PM
changed permissions, ls does not work blizunt7 Linux - General 3 09-26-2005 07:12 AM
How can I change the permissions of /dev/ptyp* (chmod does not work) gderou Mandriva 0 08-24-2004 10:37 AM
ftp: howto work with file-permissions Schmurff Mandriva 1 06-20-2004 08:52 PM
How do permissions really work on mandrake? vintermann Mandriva 7 03-09-2004 05:58 PM

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

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