Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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. . .
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"
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.
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.
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 .
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.