LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   chmod, external usb, vfat - can't chmod a directory (http://www.linuxquestions.org/questions/slackware-14/chmod-external-usb-vfat-cant-chmod-a-directory-431058/)

itsjustme 04-02-2006 03:37 PM

chmod, external usb, vfat - can't chmod a directory
 
I'm living in a windows land and I've become rusty with my Linux.

I have an external USB hard drive mounted. As root, I created a directory on it named download, since as user 'bs' I get permission denied. I'm trying to download from the internet into this directory. So, I need to make that directory available to my user account.
Code:

root@bs-slack:/mnt# ls
cdrom/  dvd/  floppy/  hd/  usb/
root@bs-slack:/mnt# cd usb
root@bs-slack:/mnt/usb# ls -ld download
drwxr-xr-x  2 root root 16384 2006-04-03 08:03 download/
root@bs-slack:/mnt/usb# chmod 777 download
root@bs-slack:/mnt/usb# ls -ld download
drwxr-xr-x  2 root root 16384 2006-04-03 08:03 download/
root@bs-slack:/mnt/usb# man chmod
root@bs-slack:/mnt/usb# mtab
-su: mtab: command not found
root@bs-slack:/mnt/usb# cat /etc/mtab
/dev/hda2 / reiserfs rw 0 0
proc /proc proc rw 0 0
/dev/hda1 /boot reiserfs rw 0 0
/dev/hda3 /usr reiserfs rw 0 0
/dev/hda5 /var reiserfs rw 0 0
/dev/hdb1 /usr/local reiserfs rw 0 0
/dev/hdb2 /home reiserfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hdc /mnt/cdrom iso9660 ro 0 0
/dev/sda1 /mnt/usb vfat rw 0 0
root@bs-slack:/mnt/usb#
root@bs-slack:/mnt/usb# chown bs /mnt/usb/download
chown: changing ownership of `/mnt/usb/download': Operation not permitted
root@bs-slack:/mnt/usb# ls -l /mnt/usb
total 1322400
-rwxr-xr-x  1 root root        28 2004-12-20 16:05 Autorun.inf*
-rwxr-xr-x  1 root root  8725221 2006-04-02 21:34 NVIDIA-Linux-x86-1.0-6629-pkg1.run*
drwxr-xr-x  2 root root    16384 2006-02-15 21:54 Recycled/
drwxr-xr-x  5 root root    16384 2005-02-01 11:27 System\ Volume\ Information/
drwxr-xr-x  2 root root    16384 2006-04-03 08:03 download/
-rwxr-xr-x  1 root root      2238 2004-09-30 14:35 iogear.ico*
drwxr-xr-x  2 root root    16384 2006-02-05 12:41 pst/
-rwxr-xr-x  1 root root 668659712 2006-03-20 20:28 slackware-10.2-install-d1.iso*
-rwxr-xr-x  1 root root 676630528 2006-03-20 20:36 slackware-10.2-install-d2.iso*
root@bs-slack:/mnt/usb#

I try to chmod it to 777, and it seems to take, but it doesn't.
The drive was originally formatted on a windows machine with fat, as you can see. I also tried chown.

What do I need to do to be able to use that as a download directory for my browser without being root?

Thanks.

drumz 04-02-2006 03:52 PM

Add the following to /etc/fstab:
Code:

/dev/sda1 /mnt/usb vfat rw,umask=000 0 0
With root, mount it as follows:
Code:

mount /mnt/usb
After mounting it, everyone will have read/write/execute permission on all files.

Vfat partitions don't support permissions, so Linux sets up the permissions when you mount the drive. They can't be changed afterwards.

itsjustme 04-02-2006 04:23 PM

Thanks a lot!

That did the trick.
:)


All times are GMT -5. The time now is 11:57 PM.