Ask / Submit
2

Change permissions recursively?

asked 2016-10-17 08:29:25 +0200

DarkTuring gravatar image

updated 2018-12-03 20:21:26 +0200

Tanghus gravatar image

I have the ~/home/nemo/music folder and lots and lots and lots of music files in many many subfolders that i copied from my laptop. Sailfish automatically restricts permissions to copied files to not execute and not read for group amd others. Others and groups need read and execute permissions so i can play my music using flow player etc.

What is a recursive terminal command that will change all permissions in the folder to accept read, and execute and write?!

image description image description

edit retag flag offensive close delete

Comments

I suppose you mean, that you copied the data onto SD-card on your laptop.

If you do this as user nemo (either directly on the device or by SSHing into it) with e.g. 'scp', 'rsync', by mounting a NFS, CIFS (SMB) "share" on your PC (e.g. with FishnetMount or cifs-utils), using "Send to phone", "Quick file-backup", Ducto etc., IMO this issue does not arise at all.

olf ( 2018-02-20 23:42:10 +0200 )edit

1 Answer

Sort by » oldest newest most voted
4

answered 2016-10-17 09:17:08 +0200

DarkTuring gravatar image

Found the answer on stack overflow:

chmod -R +rwx /home/nemo/Music

translated, change permission command, - recursively + add read, write, execute permissions to all directories and files (including subderectories)

edit flag offensive delete publish link more

Comments

3

99.99% of terminal commands aren't Sailfish-specific, but rather they apply to most Linux and Unix systems. So you'll have more luck searching for solutions on the internet with the keywords Linux / Unix / bash / sh rather than on Jolla sites.

Federico ( 2016-10-17 09:26:45 +0200 )edit
3

Also, since you only want read and execute (although read should be enough, no?), use +rx. the basic rule is to not set all permissions to everybody if it's not necessary.

Sthocs ( 2016-10-17 12:07:52 +0200 )edit
6

There is no need to set the execute bit on regular files, but you will need it on directories. Use an upper case X to only add the execute bit for group and others where it is already set for the owner: chmod -R a+rwX /home/nemo/Music

raimue ( 2016-10-17 16:21:41 +0200 )edit

thanks raimue i think thats my answer a little more accurately than mine, whats the "a" btw?

DarkTuring ( 2016-10-17 18:26:58 +0200 )edit
2

'a' is for all of user, group, and others. You could also use 'u', 'g', or 'o' before the plus sign to only change the respective rows you saw in your initial screenshots.

raimue ( 2016-10-17 19:07:55 +0200 )edit
Login/Signup to Answer

Question tools

Follow
7 followers

Stats

Asked: 2016-10-17 08:29:25 +0200

Seen: 936 times

Last updated: Oct 17 '16