1

I have a usb device FAT32 attached to my pi on which raspbian is installed. I mount it on

/mnt/sdcard1

ls -l command in /mnt gives me

drwxr-xr-x 4 root root 32768 Jan  1  1970 sdcard1

I have an fstab edited like this

    proc            /proc           proc    defaults          0       0
    /dev/mmcblk0p1  /boot           vfat    defaults          0       2
    /dev/mmcblk0p2  /               ext4    defaults,noatime  0       1

    # This is added to mount usb automatically
    /dev/sda1       /mnt/sdcard1    vfat    defaults          0       0

    # This is to bind usb as a sub directory of ipcam user, so that it has access to usb


    /mnt/sdcard1   /home/ipcam/sdcard  none  bind            0        0

What happens is when I use ftp client and login as ipcam it can write anywhere in the /home/ipcam directory but not in the /home/ipcam/sdcard What's going on ?

My ftp server running is vsftpd

0

I think your fstab line give permission to write on card to whom mount the card. To correct the problem, try to change the fstab line:

# This is added to mount usb automatically
/dev/sda1       /mnt/sdcard1    vfat    auto,nouser,noatime          0       0

The auto make the key to mount automatically.

The nouser allow all user to use the card.

The noatime is not required, it just prevent the system to update file access time, which reduce the number of access on device, and prevent thus to wear it.

You may also need to change the permission on /mnt/sdcard1 to allow all users to access it (I'am not sure on this point).

  • Still when I do ls -l the owner of /mnt/sdcard1 is root and if I manually change the ownership using sudo it says. chown: changing ownership of ‘sdcard1/’: Operation not permitted – Ahmed Jan 8 '16 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.