LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 04-02-2006, 03:37 PM   #1
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
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.
 
Old 04-02-2006, 03:52 PM   #2
drumz
Member
 
Registered: Apr 2005
Location: Scottsdale, AZ, USA
Distribution: Slackware
Posts: 188

Rep: Reputation: 33
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.

Last edited by drumz; 04-02-2006 at 03:54 PM.
 
Old 04-02-2006, 04:23 PM   #3
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
Thanks a lot!

That did the trick.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
External USB Harddisk: chmod fails Maarten_Holland Linux - Hardware 2 08-02-2010 12:05 PM
Using chown, chgrp, chmod on a vfat partition? Rodolfo Medina Linux - General 7 08-17-2005 08:17 AM
What can we do if we type chmod ugo-x /bin/chmod ?????? bunny123 Linux - Software 3 02-01-2005 08:53 PM
CHMOD in shell : chmod 777 /usr/ <---is that right? cpanelskindepot Programming 5 07-16-2004 05:37 AM
can i chmod/chown vfat partition demmylls Linux - General 6 01-17-2004 10:07 PM


All times are GMT -5. The time now is 03:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration