Results 1 to 19 of 19
  1. #1

    Urgent : Permission issue after unzip/untar archive in my shared hosting account

    Hello all.

    Recently i ordered a shared hosting plan from ccihosting.com but i'm having issues after i unzip/untar something on the server.
    The files & directories generated using the unzip script are un-editable and i can't even set a chmod on them after using Ftp.
    Far i can see using CuteFtp the Owner for the generated files is "99" when it supposed to be my username from my hosting acc.
    I did the same thing on 2 different hosting accounts ( gator & lunarp ) but the files generated after unzip have the owner the username of my hosting account.
    Now the issue is that guys from the hosting company doesn't seem to understand my issue.
    Can anyone translate me in technical terms what they need to fix in order to settle this problem ?

    Thanks to all of you.
    Sincerely,
    Adrian

  2. #2
    Tell them to change the ownerships of the files and folders. This will resolve your issues.

  3. #3
    Quote Originally Posted by sysgallery View Post
    Tell them to change the ownerships of the files and folders. This will resolve your issues.
    Hi sysgallery,

    This is the short-way scenario but i need this issue fixed so in future i don't need them to change the ownerships of the files.
    And the funny thing is that if i create a directory using ftp and upload thousand of files and sub-directories in it , i can't delete it using 'rm -rf' command from PHP because again it a permission thing.

  4. #4
    Join Date
    Apr 2009
    Posts
    184
    Ask your provider to change the ownership of these files to you through root ssh.
    Offering Reliable Shared, Reseller, Master Reseller and Shoutcast Hosting.
    High Performance VPS Hosting with 99.9% Uptime.
    Providing
    Hosting Since 2006 Locally and Since 2008 Globally.

  5. #5
    As you are in shared hosting environment, you will not having the access to use 'rm' command as they disable the commands for users. Also if you want the ownership issues get removed, just upload all the files through FTP only, not by zipping and uploading. It will take time, but no pains.

  6. #6
    Quote Originally Posted by linux2k View Post
    Ask your provider to change the ownership of these files to you through root ssh.
    Hi linux2k thanks for reply.
    This is not enough i think because on every small operation , editing stuff i need to contact them to do it.
    What they need to fix in order to have files & dir generated after unzip on my ownership ? This is the question of the day

  7. #7
    Quote Originally Posted by sysgallery View Post
    As you are in shared hosting environment, you will not having the access to use 'rm' command as they disable the commands for users. Also if you want the ownership issues get removed, just upload all the files through FTP only, not by zipping and uploading. It will take time, but no pains.
    Thanks !
    I managed also to use 'rm -rf *' command from PHP and deleted all the files from my public_html folder except those created via FTP.
    I think a senior hosting guy could smell the problem here. Why the files generated with a PHP file have Owner "99" and not my username.

  8. #8
    Then why dont you use chown command in your PHP scripts?

  9. #9
    Quote Originally Posted by sysgallery View Post
    Then why dont you use chown command in your PHP scripts?
    "For most modern Linux systems your apache user should not be run as root, and in order to change the ownership of a file or directory, you need to be root."
    I can't do it , they don't allow me to use chown command via PHP.
    I just want the sollution so that the files & directories generated after unzip using PHP will have same owner like those uploaded via ftp ( my account username ).
    I'm sure something can be done.

  10. #10
    I found an interesting post :
    "If all hosts implemented solutions like phpSuExec, this wouldn't be a problem at all. In that scenario, your Apache processes, running on uour virtual host, would run as your user account. Problem solved. It's really more of a hosting/design issue, than a PHP Application one."
    This could be the sollution ?

  11. #11
    Good to see with this option.

  12. #12
    I found also another forum post and i think i found myself the damm solution and hope guys from ccihosting will implement it.
    They relly need something like phpSuExec.
    What do you think ?

  13. #13
    As per my awareness, CCI hosting support is tremendous, as they are offering offshore web hosting and with good security installed on their server. Didn't they install phpSuExec? Get a confirmation from them, whether phpSuExec installed on their server.

  14. #14
    Quote Originally Posted by sysgallery View Post
    As per my awareness, CCI hosting support is tremendous, as they are offering offshore web hosting and with good security installed on their server. Didn't they install phpSuExec? Get a confirmation from them, whether phpSuExec installed on their server.
    Hi again,
    I'm using <? phpinfo(); ?> code to view detailed info.
    If i look for Server API on it (4th row) i see APACHE ( it suppose to be CGI ) and it means they are not using it yet ( phpSuExec ).
    I have a clear view now and seems they need to use phpSuExec .
    Some hosting companies use it since 2006

  15. #15
    Join Date
    Mar 2009
    Posts
    2,218
    Quote Originally Posted by TEmelie View Post
    Hello all.

    Recently i ordered a shared hosting plan from ccihosting.com but i'm having issues after i unzip/untar something on the server.
    The files & directories generated using the unzip script are un-editable and i can't even set a chmod on them after using Ftp.
    Far i can see using CuteFtp the Owner for the generated files is "99" when it supposed to be my username from my hosting acc.
    I did the same thing on 2 different hosting accounts ( gator & lunarp ) but the files generated after unzip have the owner the username of my hosting account.
    Now the issue is that guys from the hosting company doesn't seem to understand my issue.
    Can anyone translate me in technical terms what they need to fix in order to settle this problem ?

    Thanks to all of you.
    Sincerely,
    Adrian
    It sounds as if the FTP userid is not the same as the userid used for your Web server. That's probably quite common. Does the service offer you a way to create FTP userids?

    If not, maybe you could do the unzip via a script run from your web server; if the target directory for unzip is one you can access from that account, you should be OK.

  16. #16
    Join Date
    May 2008
    Posts
    340
    From information you've obtained from the host, it is quite clear that they're running PHP as a module(DSO) i.e PHP scripts under the Apache process user which is generally "nobody" (UID 99). And since the nobody user does not have write access to the files you upload via FTP, the files/folders cannot be deleted.

    There are 2 ways you can go about this,

    1. Ask/Force you web host to change the ownership of files and folders to user.nobody and permissions to 775 (where user is the account username). This was you can change/modify the files using FTP as well as delete them and you can also delete/modify files using PHP scripts.

    2. Inquire whether they're running another instance of PHP as CGI(suexec) and if so how it can be used for your account.
    Twitter : http://twitter.com/eth1networks
    Contact Us : support[at]eth1.in

  17. #17
    Quote Originally Posted by sysgallery View Post
    As per my awareness, CCI hosting support is tremendous, as they are offering offshore web hosting and with good security installed on their server. Didn't they install phpSuExec? Get a confirmation from them, whether phpSuExec installed on their server.
    CCI hosting ( http://www.ccihosting.com ) support is tremendous indeed but they only chat with you nothing happens.
    They said for the shared accounts phpSuExec is not an option, they can't modify PHP settings for me. Very weird because i see that all the big companies already use it.
    They don't provide SSH access , they don't have this phpSuExec module , how can i upload 2,000 small&large files ?
    Very un-professional till today i will keep you guys posted with updates.
    BTW : My ticket regarding this module was deleted )
    Anyone knows a better offshore hosting company ?
    Cheers.
    Adrian

  18. #18
    Quote Originally Posted by eth1 View Post
    From information you've obtained from the host, it is quite clear that they're running PHP as a module(DSO) i.e PHP scripts under the Apache process user which is generally "nobody" (UID 99). And since the nobody user does not have write access to the files you upload via FTP, the files/folders cannot be deleted.

    There are 2 ways you can go about this,

    1. Ask/Force you web host to change the ownership of files and folders to user.nobody and permissions to 775 (where user is the account username). This was you can change/modify the files using FTP as well as delete them and you can also delete/modify files using PHP scripts.

    2. Inquire whether they're running another instance of PHP as CGI(suexec) and if so how it can be used for your account.
    Thanks for the advice , i apreciate.
    They don't want to use it , that's obvious since they deleted my ticket also.
    I will give up and just forget about it.
    It is really annoying to play with 1k+ files without SSH/phpSuExec and to pay $19.95/m
    I'll give them a 7 after all this

  19. #19
    Join Date
    May 2008
    Posts
    340
    Glad to help. Perhaps it's the right time to search for a new webhost.
    Twitter : http://twitter.com/eth1networks
    Contact Us : support[at]eth1.in

Similar Threads

  1. Unzip files in your account
    By topdome in forum Web Hosting Tutorials
    Replies: 6
    Last Post: 08-23-2007, 09:02 PM
  2. Permission Issue
    By vnsg in forum Hosting Security and Technology
    Replies: 6
    Last Post: 07-09-2007, 03:17 AM
  3. Server Account Issue - URGENT
    By Wapture in forum Hosting Security and Technology
    Replies: 7
    Last Post: 09-25-2004, 05:10 AM
  4. untar and unzip in SSH
    By GazCBG in forum Hosting Security and Technology
    Replies: 7
    Last Post: 12-27-2002, 12:03 PM
  5. tar/untar zip/unzip
    By askids in forum Hosting Security and Technology
    Replies: 3
    Last Post: 09-15-2002, 06:33 PM

Posting Permissions

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