Archive for the Category »Linux Permissions «

SuExec server permission issue?

After enabling SuExec on server most users getting “500 Internal Server Error” at that time refer following steps.

1st)  Correct cPanel users files/directories ownership.

——

for i  in `cat /etc/trueuserdomains   | awk ‘{print $2}’`
do
chown $i.$i /home/$i -R;
chown $i.mail /home/$i/etc -R;
chown $i.nobody /home/$i/public_html;
done;

—–

2nd) Correct permission for files and directories for cPanel users from shell but make sure that you logged in as root user and running following command in /home partition.

—–

find . -type d  -perm 777 -exec chmod 755 {} \;

find . -type  f  -perm 777 -exec chmod 755 {} \;

—–

Horde session issue?



There is a very common  issue where Horde prevents access to webmail by repeatedly redirecting viewers to Language Selection screen. The following commands, executed as root, will solve these issues:

root@server[~]#/usr/local/cpanel/bin/checkperlmodules
root@server[~]#/scripts/fullhordereset
root@server[~]#myisamchk -r /var/lib/mysql/horde/horde_sessionhandler.MYI

If still you have problem then check the ownership for session directory present in /var/cpanel/userhomes/cpanelhorde directory.

root@server[~]#ll /var/cpanel/userhomes/cpanelhorde

drwx–x–x 4 cpanelhorde cpanelhorde 4096 Jun  5  2009 ./
drwx–x–x 7 root        root        4096 Dec 17 01:48 ../
drwxr-x— 2 cpanelhorde cpanelhorde 4096 Jun  5  2009 mail/
drwx—— 2 cpanelhorde cpanelhorde 4096 Jan 27 14:01 sessions/

Session directory should be cpanelhorde.cpanelhorde ownership recursively


Problem with cgi script?

Most of the time cgi script is not working properly after uploading by using FTP but script is working fine on local machine, why?

Because you need to be upload cgi script in ASCII Mode and Perl in BINARY Mode to run it without any problem.

How to disbale Directory listing for folders?

To disable the Directory listing for folders you need to create the .htaccess file under the each an every folder under which you want to disable the Directory listing and insert the following code in .htaccess file.

————
Options -Indexes
————

Please contact us if you have any problem or queries…..

What is crontab correct permission?

The crontab correct permission is 4755.

chmod 4755 /usr/bin/crontab


How to check world-writable files on Server?

You can check the world-writable files on your Server by using following command from shell.

Gunjan@root# find / -perm -2 ! -type l -ls

Category: Linux Permissions  Comments off

How to check SUID/SGID programs on your Server?

You can check SUID/SGID programs on your systemSUID/SGID programs on your Server by using following command from your shell.

Gunjan@root# find / -type f \( -perm -04000 -o -perm -02000 \)

Category: Linux Permissions  Comments off