Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Page 1 of 3 123 LastLast
Results 1 to 15 of 45

This is a discussion on Must all files and folders be 755 & 644 on my vps? in the VPS & Dedicated forum
I keep reading suPHP requires 755 & 644 or below. Is this a fact here at JPC? I still need a few folders set to ...

  1. #1
    JPC Senior Member
    Join Date
    Feb 2008
    Location
    Spotsy, Va.
    Posts
    50

    Must all files and folders be 755 & 644 on my vps?

    I keep reading suPHP requires 755 & 644 or below. Is this a fact here at JPC?

    I still need a few folders set to 777 for a gallery and a forum. I only allow registered users to upload photos.
    Regards
    William

    ImpressCms.org

  2. #2
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    Quote Originally Posted by William View Post
    I still need a few folders set to 777 for a gallery and a forum. I only allow registered users to upload photos.
    No, you do not need those folders set to 777. Ignore any installation manuals that tell you to set them 777 wide open for any user on the server to write to those folders.

    I wish developers of these software realize now that there are secure hosting environments available where 777 is NOT required and update their documentation.

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

  3. #3
    JPC Senior Member
    Join Date
    Feb 2008
    Location
    Spotsy, Va.
    Posts
    50
    So in a nut shell if the software reports errors because the folder is set to 755 just ignore it? Meaning will it will still work on your servers set to 755???
    Regards
    William

    ImpressCms.org

  4. #4
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    The reason why developers say to set folder to 777 is because the app writes files to that directory. In a traditional PHP environment scripts run as the webserver's owner (usually the "nobody" user or, more recently, the "apache" user). Since that user is not you it cannot write to directories you own, so you need to set things to be world writable to allow the script to write to them.

    Under the suPHP environment that JPC is running (as well as the phpSuExec (or whatever it was called) that they've used for the past several months until now) PHP scripts are run as the owner of the script, not the owner of the Apache process. That means that these scripts can now access any file or directory in your account, just as you can within an FTP or SSH session, so special permissions are no longer required.

    So, when installation instructions say to chmod something a certain way, just ignore that step. The defaults will work fine in this environment. Your apps should work fine.

    When JPC first switched to the phpSuExec environment, I seem to remember a few complaints of some oddball app checking the permission level of directory before it would let the script even try writing to it. This is a really bad design that won't work in this environement without hacking the script, but luckily it isn't at all common.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  5. #5
    JPC Senior Member
    Join Date
    Feb 2008
    Location
    Spotsy, Va.
    Posts
    50
    Wow sounds cool and makes very good sense to run your environment this way.
    Unfortunately for me this is the way the module is written.

    Its set to 755 and in the admin section of xoops reports nothing is writable.

    Errors Returned While Uploading
    Failed opening directory with write permission: /home/mydomain/public_html/uploads/extgallery/public-photo/

    I guess I will half to hack it...
    Regards
    William

    ImpressCms.org

  6. #6
    JPC Senior Member
    Join Date
    Feb 2008
    Location
    Spotsy, Va.
    Posts
    50
    I can set the folder needed to 777 in the directory and the gallery module works fine.

    So the next question is does JPC support any folder set to 777 ???

    I would half to rewrite alot of stuff in order to make my fav cms xoops work on these vps's.
    Regards
    William

    ImpressCms.org

  7. #7
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    Do you have a cPanel vps with suPHP? (also moving this to vps forum)

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

  8. #8
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,204
    Your VPS has NOTHING to do with JPCs setup really...

    You do not have to follow the suPHP, no 777, setup if you do not want to... Simple go to WHM and 'Configure PHP and SuExec' and change the handler to dso or whatever it is...

    Just because JPC uses suPHP/PHPSuExec on the shared servers does not mean that you have to use it.

    It is recommended to stick with suPHP/suexec but feel free to stray away from the majority...
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  9. #9
    JPC Senior Member
    Join Date
    Feb 2008
    Location
    Spotsy, Va.
    Posts
    50
    Yep cpanel with my vps Masood

    Daniel thanks for that reply. Thats what im looking for.

    So like I said I chmod the directories to 777 with whm in suphp mode. All works well on this end so far.

    Do you see any security or permission problems using suphp and having a few folders set to 777?

    You see xoops does not need the 777 permissions to run. Xoops works fine under this environment. In fact xoops has been php5 compatable for a long time. Its the different modules that interact with the users that sometimes require a 777 to upload this or that.

    I will post up over on xoops about getting those fixed.
    Regards
    William

    ImpressCms.org

  10. #10
    JPC Senior Member
    Join Date
    Feb 2008
    Location
    Spotsy, Va.
    Posts
    50
    Btw thank you guys for your time. You Rock! Jpc Rocks!
    Regards
    William

    ImpressCms.org

  11. #11
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    Yes, 777 is a security hole in itself that should be avoided. And if you have suPHP or phpsuexec setup, you absolutely do not need to change the folders to 777.

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

  12. #12
    JPC Senior Member
    Join Date
    Feb 2008
    Location
    Spotsy, Va.
    Posts
    50
    Ok I hear you load and clear Masood. But the fact still remains that I cannot upload anything with the folders set at 755.

    Now I ask you this... Is it possible that the owner permissions are incorrect. You see I love to use winscp. I always login to the server with root. This way I can clone my work over to other domains. This feature alone save ungodly amounts of time. I can just duplicate my work. Pull down a sql and upload that for a module to be exactly the way I want it. All the settings and data are set the same way every time. I dont half to do all the settings over and over on each site.

    Anyway this morning I had issues I could not run a simple script on a domain because the who owns what was incorrect. I think root own the domain when it was ported over from servint. This setup would not work and tech support chown the files and folders for me and I was up and running.

    They only did this for me on one domain. The domain thats giving me problems is different than the one I gave in the ticket. So im starting to think that my issue lays in the who owns what side of it for lack of a better word. Because you says it will work at 755 and I have a very good dev over on xoops saying the two modules in question workin phpsuexe mode.

    Here is the post Suphp, extgallery and cbb
    Regards
    William

    ImpressCms.org

  13. #13
    CTO JPC-Masood's Avatar
    Join Date
    Aug 2002
    Location
    Jaguar Servers
    Posts
    2,070
    There is your problem:

    Quote Originally Posted by William View Post
    I always login to the server with root.
    You need to change this habit and login to each account using its login so that all files and folders are owned by the user. Root user is not meant for this type of work. I always try not to login with root as it is a very high privileged account and a small mistake can ruin everything. One can always su to do something that requires root access.

    Quote Originally Posted by William View Post
    I can just duplicate my work.
    You can do that if you have account logins for two domains. Root is not required.

    Masood N. | Chief Technical Officer
    JaguarPC.com


    Helpful Links
    Knowledge Base | Network Status

  14. #14
    I didn't do it! Daniel_DBS's Avatar
    Join Date
    Aug 2007
    Location
    Mars
    Posts
    1,204
    Yep... theres the problem as Masood clarified... You are logging in as root, thus all uploaded files are going to be owned as root...
    -Daniel

    If the automobile had followed the same development cycle as the computer, a Rolls-Royce today would cost $100, get a million miles to the gallon, and explode once every few weeks.

    My scripts never have bugs. They just develop random features.

  15. #15
    JPC Senior Member
    Join Date
    Feb 2008
    Location
    Spotsy, Va.
    Posts
    50
    Ok cool im almost done asking questions. I swear...

    So is there an updated ssh command list around here for JPC?

    I have one from voxtreme from 150 years ago... Im sure some stuff has changed. I am rusty with putty. I will need to get all the correct commands down again.

    I have an example from tech support from this morning. The only problem is xoops wasn't installed on the domain they worked on. So im sure some of the examples are correct from them but some might not be aswell.

    As im starting to think about this. It might not be to bad. The only problem is I don't have a fast internet connection. Im on dial up... I use to be able to pull the structure of the files im working on down to my desk top. Then upload them back to a new domain. Mod up the sql to fit the domain im working on an bingo up and running a full blown site in minutes.

    Being on dial up I half to be able to transfer files in between domains on the server. This im very rusty on. Please bare with me... I almost there...

    I will start a new thread for ssh command specific to my needs.

    Thanks for all of your help...
    Regards
    William

    ImpressCms.org

Page 1 of 3 123 LastLast

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
  •