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

Posted on 2006-04-06
Last Modified: 2006-11-18
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..?


Question by:stephaneeybert
    LVL 5

    Expert Comment

    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.
    LVL 16

    Accepted Solution


    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

    Author Comment

    Thanks to you two!

    It now works just fine!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
    Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now