0

I tried to view file permissions

$ ll yaan/
ls: cannot access yaan/.: Permission denied
ls: cannot access yaan/Nenje Nenje - TamilTunes.com.mp3: Permission denied
ls: cannot access yaan/..: Permission denied
ls: cannot access yaan/Aathangara Orathil - TamilTunes.com.mp3: Permission denied
ls: cannot access yaan/Hey Lamba Lamba - TamilTunes.com.mp3: Permission denied
ls: cannot access yaan/list: Permission denied
ls: cannot access yaan/Latcham Calorie - TamilTunes.com.mp3: Permission denied
ls: cannot access yaan/Nee Vandhu Ponadhu - TamilTunes.com.mp3: Permission denied
total 0
d????????? ? ? ? ?            ? ./
d????????? ? ? ? ?            ? ../
-????????? ? ? ? ?            ? Aathangara Orathil - TamilTunes.com.mp3
-????????? ? ? ? ?            ? Hey Lamba Lamba - TamilTunes.com.mp3
-????????? ? ? ? ?            ? Latcham Calorie - TamilTunes.com.mp3
-????????? ? ? ? ?            ? list
-????????? ? ? ? ?            ? Nee Vandhu Ponadhu - TamilTunes.com.mp3
-????????? ? ? ? ?            ? Nenje Nenje - TamilTunes.com.mp3
valar@valar-Desktop:/song$ cd yaan/
bash: cd: yaan/: Permission denied
valar@valar-Desktop:/song$ 

Also I have tried to change file permission, but it doesn't throw error.

$ sudo chmod 644 yaan/
$

Also, I am not able to open the files. How do I recover them? Or change file permission and ownership?

2 Answers2

2

Edit: Because yaan is a directory ,you have to give the execute permission like that:

sudo chmod 744 yaan

Explanation:

7 => give the read, write, and execute to the Owner.

4 => give the read to the Group.

4 => give the read to the Others.


From the chmod manual page

execute/search only if the file is a directory or already has execute permission for some user

0

Change permission on this way:

sudo chmod 644 yaan

w/o trailig slash. If you want to change it recursively use

sudo chmod -R +r yaan

just add read permission to world

Romeo Ninov
  • 17,484