Support

Admin Tools

#30948 fix permissions with CLI script

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by toonetcreation on Sunday, 17 February 2019 14:09 CST

toonetcreation
Hello,

Is it possible to launch a fix permissions with CLI script like admintools-dbrepair.php ?

Thanks
L.

nicholas
Akeeba Staff
Manager
If you have access to the CLI you don't need a script. Linux has two commands, find and chmod, which let you do that. For example, changing all file permissions to 0644 and all folder permissions to 0755:
find /path/to/your/site/root -type f -exec chmod 0644 \{} \;
find /path/to/your/site/root -type d -exec chmod 0755 \{} \;


The only reason we added this feature to the web interface of Admin Tools is that people typically don't have access to CLI :)

Regarding DB repair, it's not possible to do it with a single command. You'd have to enter a MySQL command line, list the tables and then run a repair and an optimize command for each table separately. That's a 2N+1 complexity with N being the number of your tables. With N being between 50 and 100 on most sites that's a 15' error-prone manual task. Or a 15 second automated script. So it totally made sense writing a CLI script for it. On the other hand, fixing permissions is a 5 second manual task. There's no gain turning it into a script.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

toonetcreation
Yes I see perfectly you're right ????
I will do it like this .

Thanks and good evening

L.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!