Permissions for directory in Linux
Hi All,
I am a newbie to Linux and am trying to configure Apache 2 (Web Server), but I was not able to access the document root path with my user. After checking I was getting 403 forbidden error in my browser. Also accidentally I changed the permissions of /etc after which I am facing INIT: cannot execute "/etc/X11/prefdm" message during start up. Please help in this matter. Thanks in advance. Abhishek |
what did you do *exactly* here? If you've *recursively* changed /etc then that can be a seriously horrible ting to recover from.
FYI, here are the permissions you'd usually have on the path to prefdm, but you'll most likely have this issue again and again... [chris@thinkpad ~]$ ls -ld /etc/ drwxr-xr-x. 167 root root 12288 Sep 7 03:27 /etc/ [chris@thinkpad ~]$ ls -ld /etc/X11/ drwxr-xr-x. 6 root root 4096 Jan 24 2012 /etc/X11/ [chris@thinkpad ~]$ ls -l /etc/X11/ total 28 drwxr-xr-x. 2 root root 4096 May 18 2011 applnk drwxr-xr-x. 2 root root 4096 Oct 3 2011 fontpath.d -rwxr-xr-x 1 root root 1350 Oct 12 2011 prefdm drwxr-xr-x. 5 root root 4096 Jan 24 2012 xinit -rw-r--r-- 1 root root 547 Feb 8 2011 Xmodmap drwxr-xr-x. 2 root root 4096 Sep 7 2011 xorg.conf.d -rw-r--r-- 1 root root 493 Feb 8 2011 Xresources |
Can you tell us what distro+ver you have
Code:
cat /etc/*release* |
Hi acid_kewpie,
Thank You for your help. Below are the output: ls -ld /etc/ drwxrwxrwx 107 root root 12288 Sep 10 10:07 /etc ls -ld /etc/X11/ drwxrwxrwx 8 root root 4096 Jan 17 2011 /etc/X11/ ls -l /etc/X11 drwxrwxrwx 2 root root 4096 Aug 8 2008 applnk drwxrwxrwx 2 root root 4096 Jan 17 2011 fs -rwxrwxrwx 1 root root 947 Jul 13 2009 prefdm drwxrwxrwx 2 root root 4096 Aug 8 2008 serverconfig drwxrwxrwx 2 root root 4096 Aug 8 2008 sysconfig drwxrwxrwx 2 root root 4096 Jan 17 2011 twm drwxrwxrwx 5 root root 4096 Jan 17 2011 xinit -rwxrwxrwx 1 root root 547 Nov 14 2007 Xmodmap -rwxrwxrwx 1 root root 568 Jan 17 2011 xorg.conf -rwxrwxrwx 1 root root 492 Nov 14 2007 Xresources Hi Chris, Thank You for your advise.Below is the output: cat /etc/*release* cat: /etc/lsb-release.d: Is a directory Red Hat Enterprise Linux Server release 5.4 (Tikanga) Thanks Abhishek |
Quote:
--- only a guess ??? --- Code:
su - do you have a FULL week 12 hours a day to fix fixable but it WILL take a huge amount of time reinstall is faster 30 Min. VS days and days also RHEL5.4 you ARE paying red hat to KEEP it at this level ?? right ???? or did you never buy the required support contract 3 years ago ( 5.4 came out in Sep. 2009 ) as to Apache it is like the game "GO" 3 weeks to learn and a lifetime to MASTER there is a LOT to learn so your first stop is the documents read them http://httpd.apache.org/docs/ but rhel5 shipped with a OLD version http://httpd.apache.org/docs/2.0/ you might need to build a current version from source the current Apache 2.4 docs http://httpd.apache.org/docs/2.4/ |
Quote:
|
the apache daemon is usually run my the httpd user on rhel, not nobody.
|
on red hat /var/www/http/ is owned by the apache user " httpd" all lowercase
|
See my link in post #3; that should enable you to fix ownerships/perms
|
All times are GMT -5. The time now is 08:36 AM. |