Menu

#297 Directory rights (750) in zip-archive not suitable for some virtual server environments

0.8.1
closed-fixed
nabber00
None
5
2013-06-20
2013-06-18
mechaniker
No

After unpacking the project-zip, all of the subdirectories are set to 750. If you are in a virtual web-server environment of a cheap hoster, apache won't find any file inside a sub-dir. This is because you get your own user on your virtual environment, but apache naturally runs on its own.
You have to chmod 755$(find %somepath% -type d). This also applies to some contents of the plug-in directories.

Discussion

  • nabber00

    nabber00 - 2013-06-18

    I'm confused, can you provide what the user/group it is when you unzip it? What are the permissions on the files? It seems weird to me that the files would work but the directories would not. Will 751 fix it too?

     
  • mechaniker

    mechaniker - 2013-06-19

    For a quick check i unpacked it on my mac (sorry for that :-)) but it looks exactly like the listing on the webserver, except for being annother user-id.
    ˜˜˜˜
    m180:sphpblog-0.8.1 stefan$ ls -l scripts/
    total 648
    drwxr-x---@ 9 stefan staff 306 13 Apr 2012 classes
    -rw-r--r--@ 1 stefan staff 2172 23 Jul 2012 config.php
    drwxr-x---@ 5 stefan staff 170 3 Sep 2011 plugins
    -rwxr-x---@ 1 stefan staff 2179 3 Sep 2011 sb_blacklist.php
    -rw-r--r--@ 1 stefan staff 2627 13 Apr 2012 sb_categories.php
    -rw-r--r--@ 1 stefan staff 23622 19 Mär 2012 sb_comments.php
    -rwxr-x---@ 1 stefan staff 5415 3 Sep 2011 sb_communicate.php
    ˜˜˜˜
    notice that one of the files also has no world rights.

    The situation on the webserver: my provider gives me a shell on his server with my own username (groupname the same as user). Anything i do there happens with my id, so unpacked files belong to me. Apache naturally comes as its own uid and is able to read only via world rights.

    Maybe the way I installed the blog wasn't right or some umask is special about my provider, but wasn't unzipping and running the blog just what you recommended?

    Also i think that some of the thumb-down reviews i saw on the project page complained about something similar.

    I hope i could answer your question and sorry about my english :-)

    Stefan

     
  • mechaniker

    mechaniker - 2013-06-19

    Additional information:
    For testing 751 I need access to my webserver, maybe this evening,
    The webserver is running a recent CentOS, I used Standard-"unzip".

    BTW: I made a slightly improved german translation and don't know how to give it to you, so i attach it here.

    With kind regards from Dresden

    Stefan

     
  • nabber00

    nabber00 - 2013-06-19

    Hmmm, interesting. Zip doesn't store file permissions so I think the results you see are specific to whatever system you are using. There are many discussions about umask that probably apply. Not sure why some files come out with different permissions than others. I guess I could add some kind of file permission check, but that would have limited usefulness if you can't run the file to do the check.

    Also thanks for the German language update, I'll add that to the next release!

     
    • mechaniker

      mechaniker - 2013-06-20

      Ok, after asking my good friend duckduckgo a few questions about that, i get your point. The issue is then right outside your responsibility.
      Maybe a hint in the INSTALL.txt or an alternative tarball instead of zip could help in that case.
      BTW: the majority of strange file-permissions lived inside the plugin-directories (which maybe from another source?)
      Aside from these starting-issues I am using your blog-software happily and hope my familiy will read it throughout our holiday now.
      Sorry I can not give away the URL for reference to you, because I strictly promised to keep it private.
      Nevertheless I will give you a thumbs-up review for your work.
      Thank you for responding so quick.

      Kind regards from Dresden

      Stefan

       
  • nabber00

    nabber00 - 2013-06-20
    • status: open --> closed-fixed
    • assigned_to: nabber00
     
  • nabber00

    nabber00 - 2013-06-20

    Thanks! I added your translation file. Also I updated the INSTALL.TXT to include a set the file permissions step. I'm calling this solved.

     

Log in to post a comment.