ozgurerdogan
Verified User
- Joined
- Apr 20, 2008
- Messages
- 343
Sometimes some users deletes public_html folder (not sure if there is a way to avoid user deleting this folder?), so I have to create it with following bash:
But after creating folders, this time I am getting:
.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
even I set 755 to public_html folder. It does not fix problem. So Ihave to run:
cd /usr/local/directadmin/scripts
./set_permissions.sh all
to fix the issue. But I think I am doing in wrong way.
./set_permissions.sh all fixes .htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, is there a way to set correct permissions for that user/domain having pcfg_openfile problem?
Thanks
HTML:
=================================================================
#!/bin/sh
user=username
domain=domain.com
mkdir -p /home/$user/domains/$domain/public_html/cgi-bin
mkdir -p /home/$user/domains/$domain/private_html
mkdir -p /home/$user/domains/$domain/public_ftp
mkdir -p /home/$user/domains/$domain/stats
mkdir -p /home/$user/domains/$domain/logs
mkdir -p /home/$user/backups
chown -R $user:$user /home/$user
echo Completed...
exit 0;
==================================================================
But after creating folders, this time I am getting:
.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
even I set 755 to public_html folder. It does not fix problem. So Ihave to run:
cd /usr/local/directadmin/scripts
./set_permissions.sh all
to fix the issue. But I think I am doing in wrong way.
./set_permissions.sh all fixes .htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, is there a way to set correct permissions for that user/domain having pcfg_openfile problem?
Thanks