Find the answer to your Linux question:
Results 1 to 6 of 6
I'm running Centos on a dedicated server. I have chmodded my web directory to 777 and PHP still tells me that the directory is not writable. Here is a small ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    1

    Can't make directory writable


    I'm running Centos on a dedicated server.

    I have chmodded my web directory to 777 and PHP still tells me that the directory is not writable.

    Here is a small screenshot of it:
    10fYC.png

    I have tried a lot of different permissions, but none work.

  2. #2
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    886
    If you are running Centos 6, then SELinux is enabled by default and in enforcing mode.

    You either need to place SELinux in permissive mode, disable SELinux, or modify the appropriate file and directory contexts with
    httpd_sys_rw_content_t
    Another option would be to run httpd as an unconfined process, but if it's a webserver then SELinux is otherwise pointless and I would just disable it.

  3. #3
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Quote Originally Posted by mizzle View Post
    but if it's a webserver then SELinux is otherwise pointless and I would just disable it.
    You are going to have to explain this one a bit more. How does SELinux running on a webserver equal pointless?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  4. #4
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    886
    Running httpd as an unconfined process on a webserver would make having SELinux in enforcing mode pointless?

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Are you asking? If you are running httpd as a confined process then I could see SELinux being pointless but it you are not then I can see SELinux being effective.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #6
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    886
    Quote Originally Posted by Lazydog View Post
    Are you asking? If you are running httpd as a confined process then I could see SELinux being pointless but it you are not then I can see SELinux being effective.
    In the context of SELinux, a 'confined process' means one that is under the restraints of SELinux. With SELinux enabled in enforcing mode on CentOS 6, httpd is a confined process by default.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •