Linux - GeneralThis 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
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 have a dual-boot laptop running Kubuntu 8.04, with a shared FAT32 partition that I use to share data between Windows and Linux. I also have an external USB hard-drive that I use for backups, shared files between computers (home desktop, work desktop).
I am trying to check-out data from a subversion server to a directory on the FAT32 partition, using an SSH key residing on the USB hard-drive.
This gives me two problems.
Number one, when I try to use the SSH key it says:
Code:
Permissions 0755 for '<yourkey>' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
I can fix this, by manually using "chmod" every time the drive is mounted, but I would rather automatically set the drive permissions when the drive is hotplugged, but I don't know how this system works in Ubuntu. There's no entries for the drive in /etc/fstab. When I plug in the drive, a a dialog box pops up and I select "Open in a window". The drive gets mounted in /media/disk. So how do I make sure it gets mounted with 700 permissions only for the current user?
My second problem is that when I try to check out files to the FAT32 partition I get this:
The directory is owned by root.plugdev, and I can read and write to it normally. Now, I can use uid=XXXX to set the ownership of the drive to my user, but I would rather have the drive ownership automatically set to whatever user logs in, but I am unsure how to accomplish this either.
If anyone knows how to fix these problems, please let me know.
You can't set permissions on FAT filesystems so why not make a tiny ext2 or ext3 partition on the USB drive and store the key there with appropriate permissions? If you also use the key with Putty in Windows you could use NTFS. There is an issue though, some versions of Windows are only capable of seeing one partition on USB flash memory drive...suck it and see I guess.
Well, you can't set ones that are preserved from mount to mount, but you can use chmod to set "effective" permissions on a mounted FAT32 partition, so there must be some way to do it automatically, there's no reason why I should be forced to go to the console and type "chmod..." every time I mount it.
Quote:
why not make a tiny ext2 or ext3 partition on the USB drive and store the key there with appropriate permissions? If you also use the key with Putty in Windows you could use NTFS. There is an issue though, some versions of Windows are only capable of seeing one partition on USB flash memory drive
Hrm... so NTFS will preserve the linux permissons and ownerships I apply to it? Interesting, I will give that a shot. Incidentally, it is an external 2.5" HD in a USB enclosure, not a flash drive. Does the same partition issue exist in windows for external HDs? (i.e. is it an issue of the storage hardware (flash vs. HD) or interface (USB)?)
Well, you can't set ones that are preserved from mount to mount, but you can use chmod to set "effective" permissions on a mounted FAT32 partition, so there must be some way to do it automatically, there's no reason why I should be forced to go to the console and type "chmod..." every time I mount it.
Hrm... so NTFS will preserve the linux permissons and ownerships I apply to it? Interesting, I will give that a shot. Incidentally, it is an external 2.5" HD in a USB enclosure, not a flash drive. Does the same partition issue exist in windows for external HDs? (i.e. is it an issue of the storage hardware (flash vs. HD) or interface (USB)?)
The issue with recognising only one partition was only for flash drives, so no worries. There are also ext2 drivers for Windows but I believe they are not stable and lack important features such as understanding linux permissions and recognising journaling. It's been some time since I used them so things maybe have improved.
Takla, I took your suggestion and created small NTFS partition on the external HD, and then followed the instructions in the link, created a hidden ".NTFS-3G" directory in the root of the partition, created the appropriate "UserMapping" file within that and created the appropriate entry mapping my linux UID to my windows SID. Then I went and set the permissions in Windows so only my Windows user had access to the partition.
However, it doesn't seem to work. The drive is still mounted in Linux with 777 permissions.
Any ideas?
I have ntfs-3g installed in ubuntu (I can read and write ntfs drives...)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.