Sentora Support Forums
file permissions - Printable Version

+- Sentora Support Forums (https://senforums.mach-hosting.com)
+-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5)
+--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32)
+---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36)
+---- Thread: file permissions (/showthread.php?tid=1484)



file permissions - zoom23 - 04-18-2015

How to change the default Sentora file permissions?


RE: file permissions - Me.B - 04-19-2015

Why? What is the issue?

You can do that using chown in SSH. It doesn't work with FTP.

M B


RE: file permissions - zoom23 - 04-20-2015

(04-19-2015, 11:45 PM)Me.B Wrote: Why? What is the issue?

You can do that using chown in SSH. It doesn't work with FTP.

M B

I want to change the file permissions of the folders of my wordpress websites to 755 and for the files to 644.I can manualy change them using ftp, but its a lot of work and I dont know if its really working that way.


RE: file permissions - Me.B - 04-20-2015

So you want a bulk change from the panel? Not supported yet.


RE: file permissions - erm3nda - 06-05-2015

I have the same problem with some other panels that i tried on the past.
What i did is to create my own chmod-fix-sentora.sh file with a few lines.

I've attached too for lazy users.
Code:
#!/bin/bash # basic chmod fix for Sentora www-data folders. if [ -z $1 ]  then    echo "You must pass at least any word of the path name or put _ to fix ALL domains"; elif [ $1 == "_" ]  then    find /var/sentora/hostdata/zadmin/public_html/* -type d -exec chmod 755 {} \;    find /var/sentora/hostdata/zadmin/public_html/* -type f -exec chmod 644 {} \;    echo "Fixed chmod to ALL domains "; else    find /var/sentora/hostdata/zadmin/public_html/*$1* -type d -exec chmod 755 {} \;    find /var/sentora/hostdata/zadmin/public_html/*$1* -type f -exec chmod 644 {} \; echo "Fixed chmod to paths that contains $1"; fi


USAGE

fix perms to domain_com and all of subdomains:
Code:
./chmod-fix-sentora.sh domain_com

fix perms to a subdomain (don't need to suplly tld extension because the regexp * value.) :
Code:
./chmod-fix-sentora.sh sub_domain

fix perms on ALL (because all paths has at least one _ on their names.) :
Code:
./chmod-fix-sentora.sh _



RE: file permissions - reallyloudthat - 06-05-2015

Thanks for the help guys.

servicingstop


RE: file permissions - techincongo - 11-09-2015

Before running the command, we should make the script executable "chmod +x fix-chmod-sentora.sh"