Permissions on linux

I have a folder in the apache with 777 permissions. When installing wordpress themes through the folders have permission 755. What should be done so that when something is installed folder permissions take before?

Tnx All
TechEliAsked:
Who is Participating?
 
LuminarCommented:
chown -R www-data:www-data /var/www/html/dominio.com/wordpress/wp-includes/theme/

The apache user can then write in it without making the whole WORLD able to.
0
 
Ray PaseurCommented:
Is there something that is not working?   This sounds normal to me.
0
 
TechEliAuthor Commented:
With 755 permits can not edit the template from wordpress
0
How do you know if your security is working?

Protecting your business doesn’t have to mean sifting through endless alerts and notifications. With WatchGuard Total Security Suite, you can feel confident that your business is secure, meaning you can get back to the things that have been sitting on your to-do list.

 
farzanjCommented:
I am not understanding your question correctly.

If you want to setup mechanism so that when you create a file, it takes certain permissions, you need umask.
If you would want to set certain permissions recursively for all files and folders with a certain folder, you need chmod -R
There could be many more interpretations of your question, please clarify
0
 
wesly_chenCommented:
> When installing wordpress themes through the folders have permission 755.
Which account, root or "apache" or your account when you install wordpress?

login as that account, then

echo "umask 000" >> ~/.profile
umask 000
chmod 777 -R /path-to-wordpress-installed-dir

It will take care all from now on.
0
 
LuminarCommented:
i find it that doing chmod 775 and 777 in an apache folder is VERY dangerous..

just give the apache user  permission to the folder by saying:

chown www-data:www-data <folder>

Examplewise: chown -R www-data:www-data /var/www/wordpress
0
 
a1jCommented:
If you cannot edit template then worms and trojans cannot edit too.
Keep it locked except for the short times when  you actually need it to be world writeable.
0
 
TechEliAuthor Commented:
I do not want to give permissions to the entire Apache folder. I just want to give permissions to the folder / var / www / html / dominio.com / wordpress / wp-includes / theme /. I just want to give 777 permissions to the folder theme. If from the installed wordpress themes, these catch the theme folder permissions.
0
 
wesly_chenCommented:
# chmod 777 -R  /var/www/html/dominio.com/wordpress/wp-includes/theme
do
umask 000
before installing new themes.
0
 
TechEliAuthor Commented:
Tnx all
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.