LinuxQuestions.org
Review your favorite Linux distribution.
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-26-2007, 05:00 AM   #1
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: san antonio, texas
Distribution: Fedora 64 bit RAID0 + LUKS, CentOS (server), Backtrack, Gentoo Hardened
Posts: 1,441

Rep: Reputation: 81
permission problems with mounted device


Why is the ownership changing after mounting the filesystem? I never had this problem before.

Code:
chris@ubuntu:~$ sudo chown -c chris:root /media/sdc1/
chris@ubuntu:~$ ll /media/
total 40K
lrwxrwxrwx 1 root  root    6 2007-11-26 13:05 cdrom -> cdrom1
drwxr-xr-x 2 root  root 4.0K 2007-11-26 13:03 cdrom0
drwxr-xr-x 2 root  root 4.0K 2007-05-31 22:31 cdrom1
drwxr-xr-x 2 chris root 4.0K 2007-07-20 08:38 iso
drwxrwxrwx 1 root  root 8.0K 2007-12-25 10:51 sdb1
drwxrwxrwx 1 root  root  12K 2007-12-25 13:11 sdb2
drwxr-xr-x 5 chris root 4.0K 2007-12-24 03:23 sdb3
drwxr-xr-x 2 chris root 4.0K 2007-12-26 03:41 sdc1
chris@ubuntu:~$ sudo mount /dev/sdc1 /media/sdc1/
chris@ubuntu:~$ ll /media/
total 40K
lrwxrwxrwx 1 root  root    6 2007-11-26 13:05 cdrom -> cdrom1
drwxr-xr-x 2 root  root 4.0K 2007-11-26 13:03 cdrom0
drwxr-xr-x 2 root  root 4.0K 2007-05-31 22:31 cdrom1
drwxr-xr-x 2 chris root 4.0K 2007-07-20 08:38 iso
drwxrwxrwx 1 root  root 8.0K 2007-12-25 10:51 sdb1
drwxrwxrwx 1 root  root  12K 2007-12-25 13:11 sdb2
drwxr-xr-x 5 chris root 4.0K 2007-12-24 03:23 sdb3
drwxr-xr-x 4 root  root 4.0K 1969-12-31 18:00 sdc1
chris@ubuntu:~$
 
Old 12-26-2007, 09:50 AM   #2
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Rep: Reputation: 70
You can do whatever you want to that /media/sdc1 directory and when you mount something on top of it it will get clobbered, so of course the perms change.

Look into using udev to set your perms when the filesystem is mounted.

Here is a link to get you started...
http://reactivated.net/writing_udev_rules.html
 
Old 12-26-2007, 08:52 PM   #3
KnightHawk
Member
 
Registered: Sep 2005
Posts: 128

Rep: Reputation: 15
when you mount a drive in linux, it assumes the permissions of the one who mounted it. In your case its root.

Other permissions such as read and write, are also set by mounting options.
 
  


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
Permission problems on mounted WinXP share prismbiz Linux - Software 10 10-09-2007 10:54 PM
Can't get RW permission on a mounted samba share darkangel12613 Linux - Software 6 08-31-2006 08:04 AM
permission problems with mounted smb shares mackayr Linux - Networking 3 12-30-2004 12:48 AM
mounted but no write permission varunk123456 Red Hat 1 03-31-2004 03:54 PM
permission of mounted NTFS partition demmylls Linux - Security 2 11-30-2003 12:08 AM


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