Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an external HDD mounted in my server. It's on /dev/sdb1 (or /media/usb0). I have a proftpd user which home directory is set to /media/usb0.

The problem is that the ownership of /media/usb0 is root, and I cannot change that. I always get permission denied when trying to upload a file.

I already tried setting chmod -R 777 /media/usb0/ but it does not work too.

The proftpd linux user is proftpd.

How do I set the right permissions to the usb hdd?


share|improve this question

I would guess that your USB device is using FAT as the filesystem? FAT does not support *nix style permissions. There is no concept of ownership or permissions, and so you are not permitted to use chmod/chmod on the folder.

When you mount a FAT filesystem under Linux you can pass a few options to set the UID/GID/Dmask, and Fmask.

See man mount

uid=value and gid=value
  Set the owner and group of all files. (Default: the uid and 
  gid of the current process.)
  Set the umask applied to directories only. The default is the 
  umask of the current process. The value is given in octal.
  Set the umask applied to regular files only. The default is 
  the umask of the current process. The value is given in octal.
share|improve this answer
My fstab: /dev/sdb1 /home/usbstorage0 auto noauto,uid=proftpd,fmask=022,dmask=022 0 0 and I still getting permission denied... Any idea? – rafaame Jul 7 '11 at 22:20
If login as that user via SSH or on the local system, is that user able to write to the fielsystem? – Zoredache Jul 7 '11 at 22:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.