LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 06-16-2008, 08:34 PM   #1
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Rep: Reputation: 30
Ubuntu 8.04 Drive Permissions Issues


Here's my problem:

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:

Code:
Execute: Checkout
Error: Error while performing action: Can't check path '<checkoutpath>': Permission denied
This is the fstab entry for the drive:

Code:
UUID=XXXX-XXXX       /media/sda1     vfat    defaults,utf8,umask=007,gid=46 0       0
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.

Thanks!
 
Old 06-16-2008, 10:13 PM   #2
Takla
Member
 
Registered: Aug 2006
Distribution: Debian
Posts: 188

Rep: Reputation: 34
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.

Last edited by Takla; 06-16-2008 at 10:16 PM.
 
Old 06-17-2008, 08:42 AM   #3
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Original Poster
Rep: Reputation: 30
Quote:
You can't set permissions on FAT filesystems
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)?)

Any insight on my other issue?

thanks!
 
Old 06-17-2008, 10:31 AM   #4
Takla
Member
 
Registered: Aug 2006
Distribution: Debian
Posts: 188

Rep: Reputation: 34
Quote:
Originally Posted by JoeDuncan View Post
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)?)

Any insight on my other issue?

thanks!
This might help with info about permissions.

File ownership and permissions in NTFS-3G

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.
 
Old 06-17-2008, 10:51 AM   #5
zton82005
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Rep: Reputation: 0
Wink

I'm planning to Dual boot my laptop Os..But is it not that complicated?
 
Old 06-24-2008, 11:32 PM   #6
JoeDuncan
Member
 
Registered: Aug 2003
Location: Ottawa
Distribution: Redhat 5.2, 6.0, 6.1, Mandrake 7.2, 8.0, 9.1, 9.2, 10.0, Gentoo, Debian 3.1r0
Posts: 224

Original Poster
Rep: Reputation: 30
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...)
 
Old 06-25-2008, 03:07 AM   #7
Takla
Member
 
Registered: Aug 2006
Distribution: Debian
Posts: 188

Rep: Reputation: 34
no sorry, I'm all out of ideas on this except to try it with an ext2 partition and install the ext driver in Windows.

Last edited by Takla; 06-25-2008 at 03:08 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dell m1210 Linux issues (having issues getting network working under Ubuntu) thebert Linux - Newbie 4 03-14-2008 03:47 PM
Ubuntu Error 21 on WinXP with Windows on RAID0 Drive and Ubuntu on eSATA drive videocheez Linux - Newbie 12 06-13-2007 11:23 AM
Issues with permissions of a mounted drive mreinecker Linux - Newbie 8 03-22-2005 07:52 PM
New to linux, so so lost, auto mounting issues, permissions issues slowhand22 Linux - Newbie 2 02-10-2005 09:41 AM
permissions issues goldenmag Linux - General 3 08-01-2003 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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