Changing file/directory permissions

Status
Not open for further replies.

twdx10ho

New Member
Messages
12
Reaction score
0
Points
1
I would like to change my directories to 755 and files to 644 recursively and I think I need to run a command such as..
find * -type d -print0 | xargs -0 chmod 0755 # for directories
find . -type f -print0 | xargs -0 chmod 0644 # for files
or maybe
chmod -R u+rwX,go+rX,go-w /path

Anyway, I am not sure how to go about running this? I guess I could run filemanager in cpanel and select files/directories and hope I get them all, just thought this would be less prone to human error. Would I need to "telnet" in or something?
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
You don't have shell access on Free Hosting; you've only got PHP, cron and cPanel to work with, and I'm not entirely sure how much of the PHP filesystem functions are disabled for safety. Or which entity is running them under which circumstances; having chmod() enabled doesn't make much difference if the running entity doesn't have permission to change permissions. I think cron is you and HTTP is world, but I think a lot of things that ain't necessarily so. cPanel's file manager is guaranteed to work.
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
You can try using an FTP client to do the job. From the looks of it, FileZilla allows the ability to chmod files and directories recursively.
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
Good idea. I'm old; I keep forgetting that the tools are smart(ish) these days. (FTP itself doesn't allow that, but there's no reason a client can't do it.)
 
Status
Not open for further replies.
Top