Results 1 to 18 of 18
  1. #1
    Join Date
    Mar 2005
    Posts
    359

    How can I correct perms after phpsuexec uninstall?

    Hi,

    I remove PHPsuexec support from my cpanel server. But some scripts are not running, how can I fix the groups, files?

    Basically:
    Warning: fopen(galeria.php) [function.fopen]: failed to open stream: Permission denied in /home/fdf/public_html/crnl/fdf.php on line 56

    My file:
    -rw-r--r-- 1 fdf nobody 3163 Sep 26 03:47 fdf.php

  2. #2
    Join Date
    Oct 2006
    Posts
    64
    bump. I need to know how to fix this too

  3. #3
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Vibez,

    What is the error message that you are getting?
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  4. #4
    Join Date
    Oct 2006
    Posts
    64
    Basically:
    unlink(/home/console/public_html/components/com_remository_files/file_image_9186/img_9186_01.jpg) [function.unlink]: Permission denied in /home/console/public_html/components/com_remository/remository.class.php on line 2575
    My file:
    -rw-r--r-- 1 console console 56888 Sep 16 13:18 img_9186_01.jpg

  5. #5
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    How is php running on the server as apache or cgi?
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  6. #6
    Join Date
    Oct 2006
    Posts
    64
    Good question. How to I find out?

    php.Info says this

    Server API Apache

  7. #7
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Yes it is apache. Try changing the ownership of the file img_9186_01.jpg to nobody.nobody
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  8. #8
    Join Date
    Oct 2006
    Posts
    64
    Thanks, I had to do the folder too. Obviously I have tons of folders and files now I need to change. Is there an easy way to chown them all?

  9. #9
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    To chown all the folders and contents recursively, run this following command.

    chown -R nobody.nobody /path/to/folder
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  10. #10
    Join Date
    Oct 2006
    Posts
    64
    Thanks for that, i'll give that a go later

    Will new files uploaded be automatically assigned to nobody?

    Is it wise for me to chown all the files from public_html downwards?

  11. #11
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    If you are uploading using ftp the files will not be having user ownership. You will need to change the ownership to nobody.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  12. #12
    Join Date
    Oct 2006
    Posts
    64
    So if I upload a file via ftp I have to chown it so that it can be deleted via php at a later date? That seems a very odd way of doing things. Should there not be a default ownership that all new files get assigned?

  13. #13
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Yes it will be the case. If you are uploading using a php script the ownership will be nobody, provided the php on the server is Apache.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  14. #14
    Join Date
    Oct 2006
    Posts
    64
    So now I have a big issue. If I chown the files and folders to nobody, I cannot see them when logged in via ftp using my accountname. So having the filed owned by nobody blocks me from seeing them.

  15. #15
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    You can give jail shell access to the account and access the files using shell access.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  16. #16
    Join Date
    Oct 2006
    Posts
    64
    I think I may have fixed the issue.

    Basically in my httpd.conf the user and group was set to nobody:nobody, but my account name is 'console' so I couldnt access the site via ftp or http

    So what I have done is set user and group to 'console' inside the httpd.conf, then chownd all files in my home folder like so.

    chown -R /home/console/

    This seems to be working, but is this secure or have I opened up a security issue?

  17. #17
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    No, you have done the right thing. User/group in the httpd.conf should be in the manner you have set.
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  18. #18
    Join Date
    Oct 2006
    Posts
    64
    Thanks a lot for all your help

Posting Permissions

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