LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Permission problems with external hard drive (https://www.linuxquestions.org/questions/linux-hardware-18/permission-problems-with-external-hard-drive-610710/)

JoeC21 01-02-2008 09:55 PM

Permission problems with external hard drive
 
I have an external hard drive that when I try to transfer files to it when logged in as a user it returns permission denied. I can open the files as a user fine but only transfer files to it as root.

I opened nautilus as root and tried to changed the permissions through there but they just revert back to the defaults a second later.

Anyone know how I can change the permissions to allow my user account to copy files to the drive? It's not a huge deal to open the folder as root but would be nice if I could just do it as a user.

Thanks

kzutter 01-02-2008 10:40 PM

More Info needed
 
To help you on this, more information is needed.
We need to know:
  1. What file system is on the drive?
  2. How is it being mounted? Do you do it manually? Is it done automatically by gnome? Automatically at boot?
  3. What is it's mount point?
  4. What are the permissions of the mount point?

If you do not know any of the answers to the above questions, then type this in a command window and post the results.

Code:

$ mount

JoeC21 01-03-2008 12:06 AM

Quote:

Originally Posted by kzutter (Post 3009247)
To help you on this, more information is needed.
We need to know:
  1. What file system is on the drive?
  2. How is it being mounted? Do you do it manually? Is it done automatically by gnome? Automatically at boot?
  3. What is it's mount point?
  4. What are the permissions of the mount point?

If you do not know any of the answers to the above questions, then type this in a command window and post the results.

Code:

$ mount

1. The file system is vfat or FAT32 if that is more specific
2. I mount it manually
3. /media/sdb1
4. I believe root can create and delete files while others can only access files. I get this by right clicking the sdb1 folder>properties>permissions. It thats not it, I'm not sure how to find out.

Running '$mount' returns...

Code:

/dev/sdb1 on /media/sdb1 type vfat (rw)
for this drive

Thanks

Drakeo 01-03-2008 03:50 AM

permision
 
Quote:

Originally Posted by JoeC21 (Post 3009224)
I have an external hard drive that when I try to transfer files to it when logged in as a user it returns permission denied. I can open the files as a user fine but only transfer files to it as root.

I opened nautilus as root and tried to changed the permissions through there but they just revert back to the defaults a second later.

Anyone know how I can change the permissions to allow my user account to copy files to the drive? It's not a huge deal to open the folder as root but would be nice if I could just do it as a user.

Thanks

check your etc ftsb file
/dev/sda1 /mnt/usbdrive ext2 defaults 0 0
if somthing like that is there then in gui kde or gnome you can loggin in as root go to the /mnt/usbdrive right click it properties and set group to disk then in permissions click group and put it to can modify set to sub folders .. then go to your user manger and make sure the user that wants to use it has a check next to disk in groups.. thats the GUI way If you knew how to use the chown you would'nt be asking this. GUI on

kzutter 01-03-2008 02:56 PM

Quote:

Originally Posted by JoeC21 (Post 3009315)
1. The file system is vfat or FAT32 if that is more specific
2. I mount it manually
3. /media/sdb1
4. I believe root can create and delete files while others can only access files. I ...

As root, unmount the drive
Code:

# umount /media/sdb1
Then change the permissions on /media/sdb1
Code:

# chmod 777 /media/sdb1
Then mount it manually using which ever command you usually do, or use
Code:

# mount /dev/sdb1 /media/sdb1
Then try it to see if your user can write files, if not, we will move onto the next step.

JoeC21 01-06-2008 02:30 PM

Sorry for the long delay in posting but after running 'chmod 777 /media/sdb1' I still am getting the error message saying "You do not have permission to write to this folder."

zoranp 01-06-2008 05:25 PM

Add in your fstab line

/dev/sdb1 /media/sdb1 vfat noauto,user,uid=username,gid=group 0 0

Replace username with your username, and group with the name of your primary group (distribution dependent).

As ordinary user type

mount /media/sdb1


All times are GMT -5. The time now is 06:33 AM.