Hi, To run a phpscript i try changing the user of the /var/www , /var/www/mydomain.com and /var/www/sub.mydomain to www-data. I also did chattr -i /var/www and chattr -i /var/www/mydomain. Now when I try to open ispconfig and www.sub.mydomain.com I am getting a 500 permission denied error. But mydomain.com is working fine and giving me index.php. Please help me to correct this error.
Why did you change the user? The permissions were correct before, by changing them to www-data you opened this site for hackers and it will not work anymore, thats why you get a 500 error now.
I tried chown -R /var/www/*. output was -------------- chown -R www-data:www-data /var/* chown: changing ownership of `/var/www/clients/client0/web1e is the ': Operation not permitted chown: changing ownership of `/var/www/clients/client0/web2': Operation not permitted root@vps56230:~# 2014 Apr 24 14:50:15 vps56230 fatal: scan_dir_push: open directory maildrop: Permission denied 2014 Apr 24 14:50:17 vps56230 fatal: no SASL authentication mechanisms ----------------- which one is the default user?how to fix it?
This destroyed you whole setup. The /var partition is used by data for all kind of services like postfix, mysql, dovecot etc. and also for log files. You can not undo that easly when you dont have a backup of your server as all folders are owned by different users. But why did you run this cmmand at all? There are no user, group or permission changes required for the websites folders on a ispconfig server. ispconfig sets them all correctly to the user and groups of the sites, the site folders may never be owned by www-data and it is not nescessary to chown them to that user.
I am going to reinstall server and ispconfig. And one more doubt if I create my own directories/files in web directory and the owner set to root and permissions changed does it causes any issue?
The files in web directory are owned by the web user an client group of the website, they are not owned by root. when you upload files and folders by ftp, then teyare owned by the correct user and group automatically.
When you get a permission problem with your site again, then please post the exact error message and permissions of the files so that we find a way to solve that issue.