PDA

View Full Version : Need some help with permissions...



shawnrgr
3rd April 2006, 04:49 AM
I managed to follow a guide to allow core5 to read my ntfs usb hd. It works but only if i login as the root. It wont let me access it under my normal user login. How can I change the permissions to allow me to access it under any user?

twiistedkaos
3rd April 2006, 05:01 AM
Are you using fstab to mount them?

Edit if you are simply do somethign like this:



/dev/sda5 /mnt/NTFS ntfs uid=500,defaults,auto 0 0


Basically all you need to add is the uid=500 part to your mounting line. 500 being your user id, in most cases it's 500

Hope this helps.

shawnrgr
3rd April 2006, 05:40 AM
Im just plugging in the usb and fedora loads it... I'm new to linux so I'm not quite sure what you saying.

solarisman
3rd April 2006, 09:02 AM
what it means is you may have to explicitly set the permissions in fstab.
One question: is the usb drive plugged in when you boot the PC or after you login and gain the console? By default, devices discovered on the usb bus during boot are owned by root.

Enter the command "cat /etc/fstab" in a terminal window (as root).
Look for entries beginning with '/media'. You should see floppy and cdrom,
if you have one. Do you see an entry like '/media/usbdisk' or equivalent?

If so, scan across the line and check the mount type and permissions, and see
if it ends with the word "managed". If this is the case, then you should edit
/etc/fstab and include the line provided by twiistedkaos, above.

BTW, do you have ntfs support installed? It's not part of the stock distro

shawnrgr
3rd April 2006, 01:24 PM
Yes, I figured out how to enable ntfs support so I am able to read the drive. And no, I'm plugging the device in after fedora 5 boots up and i'm logged in. If i cant get this to work... Could I copy the contents to my main hd, format the usbdrive from fedora...? Would that format it with the correct file system? Would I have permission problems then?

Another thing... Even through I can access the drive from root and copy and excecute files... I wont let me delete..

shawnrgr
3rd April 2006, 02:29 PM
This is what my fstab looks like... I don't see anything like /dev/sda1.... I'm still a little confused but I'm getting there... What do I have to edit... or should I add that line?


/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

Seehund
3rd April 2006, 04:52 PM
This is what my fstab looks like... I don't see anything like /dev/sda1.... I'm still a little confused but I'm getting there... What do I have to edit... or should I add that line?


You should add the line.

Though it's likely, the partition is not necessarily /dev/sda1 for you.
First run "fdisk -l" as root to see where your partitions and the one you want to mount are located.

solarisman
6th April 2006, 08:44 AM
Hi shawnrgr,

have you figured it out yet? if not, try adding this line to your "/etc/fstab" file:

/dev/sda1 /mnt/NTFS ntfs rw,umask=0002,uid=500,gid=500 0 0

this gives you read/write access to the USB drive. If you want read-only access, change rw to r, and umask to 0222

Good luck!

shawnrgr
11th April 2006, 01:35 PM
Yes i have.. thank you guys. I transfered everything to my laptop hd the used fdisk & mkfs and got it working.