-2

I can't automount USB sticks on my linux because I have several problems with /media directory. Here is my ls -al result on / (I just kept the media and mnt directories for you) :

total 116
drwxr-xr-x  25 root       root        4096 juin  13 09:39 .
drwxr-xr-x  25 root       root        4096 juin  13 09:39 ..
drwx------   8 acarbonaro acarbonaro  8192 janv.  1  1970 media
drwxr-xr-x   2 root       root        4096 avril 11  2014 mnt

This already seems strange as for other users it is often owned by root.

When I try to sudo chown root:root media it says permission denied.

When I try to sudo chown 755 media it doesn't say anything but when I ls -l after nothing has changed.

The other problem : I don't know why but the media directory is empty I can't find the user directory that used to be in it.

When I plug a USB flash drive, it cannot auto mount. I have to mount it manually in another directory, which is not impossible but clearly not handy.

Thank you for your help.

EDIT:

Here is my df -T result :

Sys. de fichiers Type     blocs de 1K  Utilisé Disponible Uti% Monté sur
udev             devtmpfs     4015584        8    4015576   1% /dev
tmpfs            tmpfs         805680     1212     804468   1% /run
/dev/sda1        ext4       115214888  9815468   99523708   9% /
none             tmpfs              4        0          4   0% /sys/fs/cgroup
none             tmpfs           5120        0       5120   0% /run/lock
none             tmpfs        4028392   522580    3505812  13% /run/shm
none             tmpfs         102400      600     101800   1% /run/user
/dev/sda2        ext4       130654772 18532260  105462572  15% /home
/dev/sdb2        vfat        14938864   218480   14720384   2% /media

EDIT:

I don't know the answer to my problem, but rebooting reset the /media directory as it was before and it works agian.

carbonAdr
  • 17
  • 3
  • Can you provide output of `df -T`? Does rebooting help by chance? – alamar Jun 13 '18 at 09:22
  • I edited my post. Thanks for your help. I will reboot and tell you if it helps – carbonAdr Jun 13 '18 at 09:36
  • Rebooting helped. It works again. Thank you. – carbonAdr Jun 13 '18 at 09:43
  • 1
    Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Jun 13 '18 at 14:15
  • I didn't know that these websites were linked. Now I do. Sorry for the misunderstanding – carbonAdr Jun 14 '18 at 14:02

1 Answers1

-1

I assume the problem was that you have yanked the USB stick out of port without unmounting. UNIX is not very keen to parts of its FS disappearing. Next time, umount it first, then remove.

alamar
  • 18,729
  • 4
  • 64
  • 97