I have a 4GB USB stick which I partitioned using sudo cfdisk /dev/sdb and formatted using sudo mkfs /dev/sdb1. It's currently set to ID 83 with System Linux when I run sudo fdisk -l on my Debian Squeeze.
I use pmount to mount the external USB drives. So doing a pmount /dev/sdb1 mounts it to /media/usb0 because I have the ff. line in /etc/fstab:
/dev/sdb1 /media/usb0 auto rw,user,noauto 0 0
After issuing the pmount command, the USB is mounted to /media/usb0 -- doing an ls -l /media/usb0 gives me:
drwx------ 2 root root 16384 Mar 2 20:08 lost+found
So I go about my business and try to copy a file to /media/usb0 but I get the error below:
$ cp ~/foo.bar /media/usb0
cp: cannot create regular file `/media/usb0/foo.bar': Permission denied
But when I issue the same cp command with sudo, I am able to copy the file.
Why does this happen? I tried other USB drive I have and I am able to write to them without this error. Was there something wrong with the way I formatted or repartitioned the USB stick?