LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-05-2007, 07:13 PM   #1
gacl
Member
 
Registered: Feb 2004
Posts: 64

Rep: Reputation: 23
Mounting With Permission Problems


Hello,

I'm trying to back up all my documents to a USB flash drive, which is encrypted with truecrypt. I decrypt the partition as root and i mount the partition as a user with fstab, since i can't do it directly. But, i'm getting permission errors with rsync. I've tried many options like umask and uid, but. . .

/dev/mapper/truecrypt0 /mnt/sda1 reiserfs ??? 0 0

How can i make this work?

Thanks.

Gus
 
Old 07-06-2007, 06:17 PM   #2
gacl
Member
 
Registered: Feb 2004
Posts: 64

Original Poster
Rep: Reputation: 23
Bump!

I can mount this partition as a user OK but i can't write to it. I tried umask, user, users, uid, chmod. . .
 
Old 07-06-2007, 06:44 PM   #3
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Not sure if it works on that os.

Have you tried adding rw to owner,users...
 
Old 07-06-2007, 11:30 PM   #4
gacl
Member
 
Registered: Feb 2004
Posts: 64

Original Poster
Rep: Reputation: 23
These two give me "permission denied" if i try to copy a file:

/dev/mapper/truecrypt0 /mnt/sda1 reiserfs rw,user 0 0
/dev/mapper/truecrypt0 /mnt/sda1 reiserfs rw,users 0 0

This one i can't mount with fstab:

/dev/mapper/truecrypt0 /mnt/sda1 reiserfs rw,owner 0 0

i have to mount it as root:

mount -o rw,owner /dev/mapper/truecrypt0 /dev/sda1

which kind of defeats the purpose.
 
Old 07-06-2007, 11:38 PM   #5
gacl
Member
 
Registered: Feb 2004
Posts: 64

Original Poster
Rep: Reputation: 23
This:

/dev/mapper/truecrypt0 /mnt/sda1 reiserfs rw,uid=gus 0 0

won't mount with fstab either.

If i try that with root i get:

root:# mount -o rw,uid=gus /dev/mapper/truecrypt0 /mnt/sda1
mount: wrong fs type, bad option, bad superblock on /dev/mapper/truecrypt0,
missing codepage or other error

and dmesg gives me:

ReiserFS: dm-0: warning: unknown mount option "uid=1000"


/dev/mapper/truecrypt0 /mnt/sda1 reiserfs rw,umask=0000 0 0

won't mount with fstab either. If i do:

mount -o rw,umask=0000 /dev/mapper/truecrypt0 /dev/sda1

i get the same errors as with uid.
 
Old 07-06-2007, 11:45 PM   #6
gacl
Member
 
Registered: Feb 2004
Posts: 64

Original Poster
Rep: Reputation: 23
I also tried to chown the mount point but it changes as you mount and dismount. And i also tried to chown the . folder inside the mount point. . . no luck.

I'm trying these on two different, brand-new, UFDs . . . i doubt they're broken.
 
Old 07-06-2007, 11:53 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The uid, gid & umask options are for a vfat partition. As root, use chown and chmod to change permissions on a mounted partition. After that you should be able to mount it as a normal user if the fstab entry has the "user" option. I'm not sure how using truecrypt effects whether you can mount as a normal user or not.

The mount program has its suid bit set, but only allows a normal user to perform a mount if the user option is present in the fstab entry.

Last edited by jschiwal; 07-07-2007 at 12:06 AM.
 
Old 07-07-2007, 12:06 AM   #8
gacl
Member
 
Registered: Feb 2004
Posts: 64

Original Poster
Rep: Reputation: 23
It works!

I didn't know directories could have such identity problems. . . more like multiple personalities.

Thank you so much jschiwal, i'd been sweating over this for days.
 
Old 07-07-2007, 10:16 AM   #9
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
If you don't mind.

Thanks for letting everyone (especially jschiwal) know it works. Could you post a specific how you did it in case someone else has the same problem in the future .
 
Old 07-07-2007, 11:43 AM   #10
gacl
Member
 
Registered: Feb 2004
Posts: 64

Original Poster
Rep: Reputation: 23
Well, what i've found out is that if i have mount point /mnt/sda, owned by "root", i can chown to "user" ( in other words, whatever your user name is ) and i'll be the owner of the directory. But, if i mount /dev/sda to it, the permissions change and the directory is owned by "root" again! Now, if you unmount, the directory will be owned by you again, but you need to be the owner when it's _mounted_! So, you have to chown the directory when the partition is mounted. Everytime you mount that partition it will automatically switch its permissions. In other words, the permissions for a mounted directory ( such as /mnt/sda ) are not the same as the permissions for an unmounted directory ( such as /mnt/sda ), even when they are one and the same!

Cheers.

Gus
 
  


Reply

Tags
chown, mount, permissions, reiserfs, truecrypt


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
Mounting and permission trouble. spitfire999 Linux - Newbie 5 03-28-2005 04:53 PM
mounting sd cards - permission problem Veteq Linux - Software 1 01-19-2005 06:21 PM
problem mounting DVD - permission denied dgitelman Linux - General 7 09-07-2004 02:10 PM
NFS mounting : Permission denied Bahador Linux - Networking 3 07-18-2003 04:33 AM
Permission problems when mounting hd0 orange400 Linux - General 17 03-25-2003 02:24 AM

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

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