7

So there's a user rtorrent:torrent which is in group media-agent.

Here is the command I'm trying to get working:

rtorrent@seedbox:/shared/storage$ cd books
bash: cd: books: Permission denied

Even though the folder has permission 664:

rtorrent@seedbox:/shared/storage$ ls -al
total 44
drwxrwxrwx 11 media-agent media-agent 4096 Aug 15 15:05 .
drwxrwxrwx  8 root        root        4096 Aug 15 01:12 ..
drw-rw-r--  3 media-agent media-agent 4096 Aug 15 15:15 books
drw-rw-r--  2 media-agent media-agent 4096 Aug 15 15:03 cartoons
drw-rw-r--  4 media-agent media-agent 4096 Aug 15 01:10 games
drw-rw-r--  3 media-agent media-agent 4096 Aug 15 00:47 libraries
drw-rw-r--  5 media-agent media-agent 4096 Aug 12 16:54 media-center
drw-rw-r--  2 media-agent media-agent 4096 Aug  6 15:31 other
drw-rw-r--  8 media-agent media-agent 4096 Aug 15 01:10 personnal
drw-rw-r--  5 media-agent media-agent 4096 Aug 15 01:10 software
drw-rw-r--  2 media-agent media-agent 4096 Aug  6 18:38 sync

Here is the group setup:

rtorrent@seedbox:/shared/storage$ getent group | grep 'media-agent'
torrent:x:1005:vinz243,www-data,ftpuser,media-agent,nodejs,rtorrent
media-agent:x:1007:vinz243,plex,deluge,rtorrent,root,nodejs
nodejs:x:1008:media-agent
Vinz243
  • 175

2 Answers2

14

To be able to cd into a directory you need x permissions. Your books directory doesn't have that:

drw-rw-r--  3 media-agent media-agent 4096 Aug 15 15:15 books

Indeed none of those directories have x permissions.

You can recursively fix permissions with something like

find . -type d -exec chmod a+x {} \;

You may need to be the media-agent user (or root) to do that.

4
chmod g+x books

Executable flags for directories mean listing.

Ipor Sircer
  • 14,546
  • 1
  • 27
  • 39