SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    can't edit php.ini even though set permission to 644

    hi,

    why can't I edit php.ini even if set permission to 644?

    Code:
    chmod 644 php.ini
    but when try to edit and save changes get error: permission denied..

    (this is on my local PHP env, unix/mac 10.6.8)

    thank you...

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Have you checked ownership too? (chown)

  3. #3
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Code:
    
    chown 644 php.ini
    
    chown: php.ini: Operation not permitted
    this is on my own machine.. that no one else uses... I should automatically have permissions to everything...

    I don't get why sometimes don't have permissions to edit files on my own computer..

    :-(


    thank you....

  4. #4
    SitePoint Evangelist
    Join Date
    Oct 2005
    Location
    Michigan, USA
    Posts
    434
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Some system files aren't available for just anyone (or any program) to change or delete. This is for your own good. For such cases you need to act as the root user, or superuser. Usually this means typing "sudo" before the command and it will ask you for a password. This will allow you to do something as the superuser.

    Code:
    sudo nano php.ini
    The above code will open the nano editor and allow you to edit and save. Substitute nano with the command to open the editor of your choice. (I don't even know if nano is on a mac by default)
    - Robert

  5. #5
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    815
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    that worked! thank you... (but didn't solve Drupal install prob I was hoping to solve... yikes :-( )


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
  •