I have changed my windows machine to Artix linux. And I had bunch of music in the windows so I just kept them in drive and moved them over to new Artix installation. At first, the permissions of files and directories was insane, everyone had execute permissions for all directories and files(because they were coming from windows). So I changed them with runnign chmod -x {dirs and files}
. Because I have done all the installation and the moving the folder over as root, obviously, the owner of the files was root. So I changed them with chown -R murad rammstein
(all my music is in that folder). But when I try to cd rammstein
I get cd rammstein/ Permission denied
. So what is the problem?
The permissions and owner of the folder
drw-r--r-- 9 murad wheel 4096 Jan 31 15:54 rammstein
All the other folder and files are the same, for example the directories inside of rammstein
are
drw-r--r-- 2 murad wheel 4096 Jan 31 15:53 rammstein-herzeleid-1995
<and 5 different folders with the same perms/owner>
And the songs' permission inside of an album folder
-rw-r--r-- 1 murad wheel 9688925 Jan 31 15:53 rammstein-asche-zu-asche.mp3
From here it's obvious that I can, at least, view those folders and files. But I'm not sure a simple cd
gives Permission denied
error.
cd
into it.chmod +x rammstein
. – Jan 31 '21 at 19:31x
permission grants permission to search the directory. It's necessary.find . -type d -print0 | xargs -0 --no-run-if-empty chmod o+x
should fix. – waltinator Jan 31 '21 at 19:33