How do I change the Apache root permission? - apache

Upgrade to PHP 7.1 and getting 403 error. How do I change the root permission to 751?

As the root user, run:
chmod 751 path/to/your/directory/
use the "recursive" option if you want to also modify permissions of all subdirectories:
chmod -R 751 path/to/your/directory/
then do this:
ls -l
This should show that your directory is owned by root and now has permissions "drwxr-x--x".
Source and more details: http://www.filepermissions.com/directory-permission/751

Related

How to debug `podman unshare` commands / Podman permission issues?

I understand that podman unshare can be used to properly set the permissions on unprivileged containers.
So podman unshare chown 1234:1234 -R /home/user/volume can be used to set the volume to the properly mapped ids.
But I'm getting permission errors when I'm trying to do that:
podman unshare chown -R 1234:1234 -R /home/user/foo/bar; echo $?
chown: changing ownership of '/home/user/foo/bar': Operation not permitted
1
The first thing I thought about was directory permissions but it fails even if I'm giving the destination directory 0777.
I'm calling the command as user user and the parent directories have these permissions:
drwxr-xr-x root /home
drwxr-x--- user /home/user
drwxrwxrwx user /home/user/foo
drwxrwxrwx user /home/user/foo/bar
It isn't my intention to really use 0777 in production but something is off even with 0777 and it's not clear to me how to debug this.

CakePHP based application installation error: 777 permission directory is not writable?

Trying to install my CakePHP based application on server, but got following error:
Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /var/www/html/cakephp-2460/lib/Cake/Cache/Cache.php on line 325
Warning: /var/www/html/tmp/cache/persistent/ is not writable
Sounds simple, but it is not - because my 'persistent' directory IS writable - in fact, /tmp and it's sub directories are writable.
Can you point me where is the problem? Do I missing some of PHP modules on server, or something like that?
Is there something to do with SeLinux?
Check that the user group for that directory is correct.
Maybe the user owner group does not have root permissions and therefor cannot write.
you may need to do the following on your server:
chown root:root -R /path_to_cake/app/tmp
Yes it is the problem in your SeLinux.You have to set www/..path../tmp directory is a httpd_cache_t so opan your terminal and
list to see all httpt_cache_t in system
# semanage fcontext -l | grep httpd
Set your www/.../tmp directory
# semanage fcontext -a -t 'httpd_cache_t' 'www/..path../tmp(/.*)?'
# restorecon -Rvvv /path/to/wwwroot/cache

Drush make directory is not writable

I am running a drush make and getting the following error
Directory /Applications/MAMP/htdocs/geoslate/sites/default exists, but is not writable. Please check directory permissions. [error]
Unable to copy /tmp/make_tmp_1365076314_515d695acefc3/__build__/sites/default to ./sites/default. [error]
Cannot move build into place
I am not an expert on permissions in the terminal, can you give me a hand to give the directory the write permisions. I have tried chmod -w /Applications/MAMP/htdocs/geoslate/sites/default and chmod u+x /Applications/MAMP/htdocs/geoslate/sites/default
chmod +w <directory> solved the problem

File writing permission denied in mod_wsgi deployed app

I'm trying to deploy a Pyramid app using mod_wsgi on Apache.
I get IOError: [Errno 13] Permission denied on templates folder, where mako caches his templates, even if I grant write permissions to anybody.
If I remove template caching from my ini file the site runs flawlessly.
I also tried running Apache as the user owning the folder instead of www-data with no luck.
Any clue?
It's an Apache permission issue,
I had to change owner of folder to www-data user and set permissions to 775
chown -R www-data:www-data ~/data
chmod -R 775 ~/data
Also see here but note for Mako 664 permissions will not be enough

cd'ing permissions denied after enabling root user on mac os x 10.6.4

I enabled root in terminal by sudo passwd root and then attempted to cd a rails site folder located on my desktop. I got the error -bash: cd: /Users/fred/Desktop/sitefolder: Permission denied
How to get rid of this error/ enable all permissions for root? Thanks
Are you sure you called cd as root?
If yes, check if the owner of the folder is root. If not call
sudo chown /Users/fred/Desktop/sitefolder root
then check if the owner has reading permission. If not call
chmod 744 /Users/fred/Desktop/sitefolder
(this enables all permissions for owner and only reading permission for group and others). If you don't care much about that folder you may instead call directly
sudo chmod 777 /Users/fred/Desktop/sitefolder
giving all permissions to every user.