shit problem tuesday about permission

oke my first fucking problem is i can’t open file ex: index.php on the browser and give some internal server error
then i check the file perm and group used, shit my user user other group called the group ‘devuser’ then i remove the group with edit file /etc/group then FUCK! the problem is still going. time after time i got some article about that on the internet. and my first thing to do is. like below.

# id myuser
uid=521(myuser) gid=111111(devuser) groups=111111(devuser)
# usermod -g 521 devuser
# groupmod -g 521 myuser
# usermod -g 521 myuser
# id myuser
uid=521(myuser) gid=521(myuser) groups=521(myuser)

then i login in my user

$ umask 022

ok my fucking problem done.

Advertisements

solve internal 500 after move directory from another server (apache)

do this command on directory /var/www/html/ or your documentroot

root@hostname# find * -type d -print0 | xargs -0 chmod 0755 # for directories
root@hostname# find . -type f -print0 | xargs -0 chmod 0644 # for files

or you can with this command too

for file

$ find /path/to/directory -type f -exec chmod 644 {} \;

for directory

$ find /path/to/directory -type d -exec chmod 755 {} \;