LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-16-2005, 08:42 PM   #1
benobi
LQ Newbie
 
Registered: May 2004
Posts: 18

Rep: Reputation: 0
file permissions and other info ok when root, but not ok with other user


I have a bunch of video files stored on my secondary hd. The partition type is ext3. Anyway, when I log in as super user with 'su' at the console and type 'ls -l' all the permissions are ok. I see the correct permissions, user, group, file size, etc. But then when I log out of super user by typing 'exit' and do a 'ls -l' with my normal user, for each file listed I get a question mark '?' for directory, the permissions are all hyphens, the user, group, and file size is a '?' as well. The file name is red background, white foreground.

Same thing is wrong when I look at the files using nautilus. When I start nautilus with super user access. The files, permissions and stuff are all ok. However when I use nautilus in normal user mode, it's all screwed up. The file type is unknown, the file size is '...'. And in the permissions tab it say's "The permissions of "file name" could not be determined.

I have a few other hd's and they're all ext3 I believe and they all seem to be fine, they work as root or as a normal user. It's just this one hd.
 
Old 10-16-2005, 09:57 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,477

Rep: Reputation: 191Reputation: 191
Mount the affected partition , su to root and run:

# chmod 1777 -R <mount point>

where "mount point" corresponds to the mount point of the troubled ext3 partition. That will give all users read/write access to all files on the partition. The "R" recursively makes the change in ownership. See if that corrects the problem.
 
Old 10-17-2005, 03:22 AM   #3
benobi
LQ Newbie
 
Registered: May 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Wow thanks, that did the trick. What happened there? How come the permissions and stuff looked ok as root but not as the owner?

Also, what's the 1 in front of the 777 mean? I know 7 sets rwx permissions, not sure what the 1 does.
 
Old 10-17-2005, 01:28 PM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,477

Rep: Reputation: 191Reputation: 191
The "1" sets the "sticky bit". When the sticky bit on a directory is set, the files in that directory can only be renamed or removed by the owner of the directory, the owner of the file or root, regardless of the fact that the file permissions on the file would otherwise allow other users to rename or delete the file. It's typically used with mount points to linux filesystems, especailly in a multiuser environments It allows all users to store files on the partition and all others to access those files but only the owner and root to delete or rename the files created.
I'm not sure why it was originally screwed up, but I suspected the files may have been created on another system which set some weird permissions/file ownerships or your system had improperly set mount point permissions. I thought resetting it to a sensible default would probably fix it which apparrently it did.
With linux filesystems, you change permissions on a partition by changing the permissions on the mount point with the partition mounted. If the partition is not mounted when the chmod command is made, it won't work. This doesn't work for windows filesystems by the way(FAT and FAT32). Those don't have a native permission structure, unlike linux filesystems. One is grafted on to FAT and FAT32 partitions in linux by the options passed through the fstab entry.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using root permissions with another user JWT2 Linux - Security 11 10-06-2005 08:13 PM
Root permissions for a user Neutron1998 Linux - Newbie 1 09-30-2004 05:28 PM
root vs. user file permissions learning2fly Slackware 4 07-17-2003 01:06 PM
User Permissions?Root? bongski55 Slackware 7 06-17-2003 07:13 AM
Giving a user all root permissions ranixlb Linux - Security 9 05-15-2002 01:50 PM


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