Closed MrKeiKun closed 10 years ago
755 and 644 works with apache/nginx user only. If you want to use root owner fo files, you shoud set 775 and 664.
cd /var/www/rainloop
find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \;
@RainLoop
still not working have you guys even tested this over centos 6.x and 7? cause default all files and folders located @ /var/www/ are all owned by root generated by apache(from base) of centOS
Please, run this code in RainLoop Webmail root folder.
check.php
<?php
define('APP_DATA_FOLDER_PATH', './data/');
$sCheckName = 'delete_if_you_see_it_after_install';
$sCheckFolder = APP_DATA_FOLDER_PATH.$sCheckName;
$sCheckFilePath = APP_DATA_FOLDER_PATH.$sCheckName.'/'.$sCheckName.'.file';
@unlink($sCheckFilePath);
@rmdir($sCheckFolder);
$aResult = array();
if (is_dir(APP_DATA_FOLDER_PATH))
{
$aResult = array(
'1) is_dir='.(@is_dir(APP_DATA_FOLDER_PATH) ? '1' : '0'),
'2) is_readable='.(@is_readable(APP_DATA_FOLDER_PATH) ? '1' : '0'),
'3) is_writable='.(@is_writable(APP_DATA_FOLDER_PATH) ? '1' : '0'),
'4) mkdir='.(@mkdir($sCheckFolder, 0755) ? '1' : '0'),
'5) file_put_contents='.(false !== @file_put_contents($sCheckFilePath, time()) ? '1' : '0'),
'6) unlink='.(false !== @unlink($sCheckFilePath) ? '1' : '0'),
'7) rmdir='.(false !== @rmdir($sCheckFolder) ? '1' : '0')
);
}
else
{
$aResult[] = 'is_dir=0';
}
echo implode("</br>\r\n", $aResult);
?>
@RainLoop
1) is_dir=1
2) is_readable=1
3) is_writable=0
4) mkdir=0
5) file_put_contents=0
6) unlink=0
7) rmdir=0
Your data folder is not writable from PHP code. Try to set correct chown for data folder (your webserver user - apache, www-data or nginx)
@RainLoop
I already 777 everything still not working
can you give me a code that will write something inside data? cause i don't think data isn't writeable
I already gave you the code. He tried to write files in the data folder.
@RainLoop
so 1-7 should be is equal to 1 that is just over /data/ right?
Yes
Is this issue still relevant?
Selinux issue~ @RainLoop Documentation should tell to disable Selinux~
Ok, thanks!
i had the same problem. 777 worked.
Same had to change chmod to 777
@RainLoop 1) is_dir=1 2) is_readable=1 3) is_writable=1 4) mkdir=1 5) file_put_contents=0 6) unlink=0 7) rmdir=1
every thing 777. but not working :(
Took me a little while to figure out, but the solution is to have SE Linux allow writing data folder by httpd: You need to change the label on '/your/installation/folder/data'. In my case this is done by the following two commands (as root user):
[root@machine rainloop]# cd /var/www/html/rainloop
[root@machine rainloop]# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/rainloop/data'
[root@machine rainloop]# restorecon -v '/var/www/html/rainloop/data'
Note that the complete path to the rainloop data folder must be specified. You can check the setting using ls -Z:
[root@machine rainloop]# ls -Z
drwxr-xr-x. apache apache system_u:object_r:httpd_sys_rw_content_t:s0 data
-rw-r--r--. apache apache system_u:object_r:httpd_sys_content_t:s0 index.php
drwxr-xr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 rainloop
And with the check.php script from a previous comment the output should be:
1) is_dir=1
2) is_readable=1
3) is_writable=1
4) mkdir=1
5) file_put_contents=1
6) unlink=1
7) rmdir=1
[202] Data folder permissions error [is_writable]. i have SSH console. how do i make this run?
following the doc has worked for me :
http://www.rainloop.net/docs/permissions/
maybe it was the missing : chown -R www-data:www-data .
not worked.
i have
1) is_dir=1 2) is_readable=1 3) is_writable=1 4) mkdir=1 5) file_put_contents=0 6) unlink=0 7) rmdir=1
chmod = 0777
but i dont have ssh access
what should i do?
You should try
setsebool httpd_unified true
setsebool httpd_can_network_connect true
yum install policycoreutils-python
cd /var/www/html/rainloop
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/rainloop/data'
restorecon -v '/var/www/html/rainloop/data'
systemctl restart httpd
It is working for me on my centos7+rainloop.
you should desable selinux and reboot your os
For Windows + IIS you have to give proper permissions to IUSR also
I had the same problem with SELinux off and correct permissions (644 for files and 755 for directories). I needed to change php-fpm user to the same user as web server (e.g. nginx, www-data, ...)
here is what I changed in /etc/php-fpm.d/www.conf
in CentOS 7:
listen.owner = nobody
listen.group = nobody
user = nginx
group = nginx
and then sudo systemctl restart php-fpm
solved the problem
I had the same problem with SELinux. first setenforce 0 and then try if everything is ok, then enable SELinux setenforce 1 and try to find the targets witch SELinux denies them . Tail -f /var/log/audit/audit.log | grep deny then with semanage or other tools set the proper permission.
hi , i had the same problem ;
1) is_dir= 2) is_readable=1 3) is_writable=1 4) mkdir=1 5) file_put_contents=1 6) unlink=1 7) rmdir=1 Selinux disable
but : [202] Data folder permisions error
os: centos 5.11 / apache 2.2.31
shaahinhs , you should follow https://github.com/pierre-alain-b/rainloop-nextcloud/issues/7
Might be a dumb addition, but make sure the rainloop folder is owned by www-data.
Hello, Just my two cents on a topic that, I guess, still raises issues in a lot of minds all year long (not only about Rainloop). For me, what is said on http://www.rainloop.net/docs/permissions/ is not enough since it takes some assumptions (eg. www-data user) with no strong way to figure-out what to do if your system is not perfectly as described...
So, here is my proposition: 1) cd root-directory-where-rainloop-installed (should contain 2 directories: 'rainloop' and 'data') 2) ps aux | grep name-of-your-webserver (e.g. nginx) => In 1st column you see user running web server (for nginx, consider worker only) 3) chown -R webserver_user_found_above:webserver_user_found_above rainloop 4) ps aux | grep php => In 1st column you see user running PHP code 5) chown -R php_user_found_above:php_user_found_above data 6) chmod all directories recursively to 755 (through SSH or using FTP client like FileZilla) 7) chmod all files recursively to 644 (through SSH or using FTP client like FileZilla) 8) Test all is OK with PHP script provided by Rainloop in comment #50786471 above 9) As double-check, go to Rainloop Admin panel and do a change, then logout/login to see if kept.
For example, here an exotic context: in a VPS I just installed yesterday, the user about Nginx was "emps" (related to Webuzo, a control panel from which I installed Nginx) and the one running PHP-FPM was "admin" (this being confirmed looking in the php-fpm.conf managed by Webuzo again). So, my two concerned users were "emps:emps" and "admin:admin".
But, please, never go the devil way giving ownership to root or superuser with dangerous chmod like 777.
Hoping it may help...
For those who use nginx and php-fpm: As of PHP 7.4 php-fpm protects the system by mounting /usr, /boot, and /etc directories read-only. For it to work, the directory /usr/share/webapps/ must be moved to /www/, for example.
Information: Im using rainloop from github src, I installed once before on another server. Worked fine same procedures. Now im running centos7.
I already ran
still not working