• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

My Kubuntu root user cannot chmod the files of an external hard drive

Dear all,

My Linux Kubuntu box is mystifying me.

The root user cannot chmod files on an external hard drive.

Here is my /etc/fstab file:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid,nouser 0 1
/dev/hda7 /home ext3 defaults,atime,auto,rw,dev,exec,suid,nouser 0 2
/dev/hda6 none swap sw 0 0
/dev/hdc  /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sda1 /mnt/usbdrive1 vfat defaults,uid=0,gid=0,noauto,rw,user 0 0
/dev/sda2 /mnt/usbdrive2 vfat defaults,uid=0,gid=0,noauto,rw,user 0 0
/dev/sda3 /mnt/usbdrive3 vfat defaults,uid=0,gid=0,noauto,rw,user 0 0
/dev/sda4 /mnt/usbdrive4 vfat defaults,uid=0,gid=0,noauto,rw,user 0 0

When I do the command

chmod 777 myfile

it just does nothing and does not give any error message.

Any clue..?

Thanks

Stephane
0
stephaneeybert
Asked:
stephaneeybert
1 Solution
 
csgeekpyroCommented:
I'm assuming that it's one of those /dev/sda* disks that's giving you trouble...

vfat doesn't support file permissions, that's why you can't chmod anything on those.  You can pass the permissions to use on the devices when you mount them; see the manpage for mount for the syntax.
0
 
xDamoxCommented:
Hi,


What you will need todo is set a UMASK in your arguments in fstab e.g.

/dev/sda1 /mnt/usbdrive1 vfat defaults,uid=0,gid=0,noauto,rw,user,umask=0000 0 0

This will set /dev/sda1 to 777
0
 
stephaneeybertAuthor Commented:
Thanks to you two!

It now works just fine!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now