SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict CeleronXL's Avatar
    Join Date
    Dec 2002
    Location
    United States of America
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Check CHMOD 777 or Permission To Write To Dir

    How would you check that a directory has the permissions to allow writing to files?

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    UK
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    log in to the server
    cd to the directory's parent directory and:

    ls -l

    Check to see who owns the directory and what the permissions are set to, e.g. rwxrwxr-- would be read, write and execute for the owner, and the group, anyone else can read only.

    Often PHP runs as user nobody and so you usually need to have the directory's Other permissions set to rw (6). E.g. rwxrwxrw-

  3. #3
    ********* Member website's Avatar
    Join Date
    Oct 2002
    Location
    Iceland
    Posts
    1,238
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    take a look at fileperms()
    - website

  4. #4
    SitePoint Addict CeleronXL's Avatar
    Join Date
    Dec 2002
    Location
    United States of America
    Posts
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah thanks, it would be fileperms().

  5. #5
    SitePoint Zealot
    Join Date
    Dec 2001
    Location
    UK
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <-- Doh!
    (totally misread the question)


Bookmarks

Posting Permissions

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