Permission of a mounted EXT4 for a specific user

I basically stumbled upon a problem I need help with.
I mounted a HDD. In my /home folder I created several symlinks that point to folders on that HDD. Unfortunately I am unable to create the symlink for the Videos folder, however all other folders worked fine.

This is what I did

  1. sudo mkdir /mnt/md0_crypt
  2. sudo chown me:me /mnt/md0_crypt
  3. sudo chmod 700 /mnt/md0_crypt
  4. nano /etc/fstab: UUID=LONG-NUMBER /mnt/md0_crypt ext4 rw,nosuid,nodev,nofail,exec,auto,nouser,async,relatime 0 0
  5. Reboot
  6. rm -r -f /home/me/Musik
    rm -r -f /home/me/Videos
    ln -s /mnt/md0_crypt/me/Musik /home/me/Musik
    ls -s /mnt/md0_crypt/me/Videos /home/me/Videos
    

Когда я пытаюсь создать символическую ссылку «Видео», происходит сбой

ls: Access to '/home/me/Videos' not possible: File or directory not found
/mnt/md0_crypt/me/ videos:
0 in total

Я использовал chmod 700, потому что я хочу быть единственным пользователем, который имеет доступ к подключенному жесткому диску. Я не знаю, забыл ли я что-то, связать монтирование ..

Интересно, что я получаю это:

>>>ls -l /mnt/md0_crypt/me                                                                                              
total 52
drwx------ 13 me me 20480 25. Okt 2019   Musik
drwxr-xr-x  2 me me  4096 21. Jul 20:12  Videos
1
задан 21 July 2020 в 21:56

1 ответ

Just a typo, look at step 6 in your question:

  • You removed /home/me/Videos with rm -r -f /home/me/Videos
  • You used ls instead of ln in ls -s /mnt/md0_crypt/me/Videos /home/me/Videos, but you cannot ls this folder, you just removed it.

The error message says ls: Access to '/home/me/Videos' not possible, it's not complaining that ln fails, ls is failing.

2
ответ дан 30 July 2020 в 22:04

Другие вопросы по тегам:

Похожие вопросы: