Search…

X3 Photo Gallery Support Forums

Search…
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

v0.5 - folders /app/ and /panel/ with 775 instead of 755

29 Nov 2014, 04:51

I just installed version 0.5 by uploading the zip-file to the server and extracting it. The check-page of the gallery (/check/) showed no issues.
Unfortunately, the installation does not work (can't access the panel & preview images won't get rendered) and the server throws an internal error exception. This is what's listed in the Apache error logs:
SoftException in Application.cpp:601: Directory ".../public_html/x3-new/app" is writeable by group, referer: http://...
SoftException in Application.cpp:601: Directory ".../public_html/x3-new/panel" is writeable by group

manually chmod from 775 to 755 solves the issue.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14469
Joined: 30 Sep 2006, 03:37

Re: v0.5 - folders /app/ and /panel/ with 775 instead of 755

29 Nov 2014, 05:23

First of all, why are your folders set to 775 in the first place if your server creates an error on this permission? In the new docs, we recommend using 755 and I don't see any reason why your server would set 775 by default, then create an error because of it, and recommend setting 755 instead.
https://www.photo.gallery/x3docs/setup/permissions/

We do NOT preset permissions on files- and folders in X3 in the zip file, and they are set to a default after you uploaded by FTP based on server settings (and possibly FTP settings). If your server is reporting an error with incorrect permissions after "installation (its not really an installation process, but just an upload), then there are two possible reasons for this:

A) 775 is the default permissions for your uploaded folders, either set by server or your FTP application (unlikely). This would be a very poor decision from whoever has set that default, because basically 775 is quite insecure, and your server even creates errors because of it.

B) Someone or somehow, the permissions have been set to 775 on your uploaded folders by mistake, either when you previously setup X3 or its been set manually.

X3 is not capable of setting permissions to any folders anyway. What is the link to your new /check/ page?
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

Re: v0.5 - folders /app/ and /panel/ with 775 instead of 755

29 Nov 2014, 05:49

I don't know why the permissions are set to 775 after extracting. I thought maybe you compress them with those permissions :-)
I just extracted the files again, please check the attachment to see the initial folder structure.

Yes, I totally share your opinion that 775 should be changed to 755, no doubts. I've also seen the recommendations in the docs.

This is the check-page: http://x3-new.240.ch/check/
Attachments
x3.png
x3.png (117.98 KiB) Viewed 4114 times
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14469
Joined: 30 Sep 2006, 03:37

Re: v0.5 - folders /app/ and /panel/ with 775 instead of 755

29 Nov 2014, 06:27

RBachmann wrote:I don't know why the permissions are set to 775 after extracting. I thought maybe you compress them with those permissions :-)
I just extracted the files again, please check the attachment to see the initial folder structure.
If anything, this is your ZIP uncompress application. We don't even have permissions 775 on X3 files by default, and permissions don't transport through file systems (which is good of course), because you own operating systems default should be applied. Furthermore, the permissions that exist AFTER you unzip them shouldn't even get inherited after you uploaded them anyway ... Normally after an FTP upload, the permissions of the uploaded file/folder should be set to your server default (not what they were on your local operating system, which might be wrong or entirely incompatible).

Just as en example I did right now. This is a file BEFORE upload I set to 666 (just demonstration):
Image
After uploading that file to server, the permissions of the file are set to the server defaults and are NOT inherited from your local file system:
Image

Thus, as mentioned above, this is not anything we can prepare up front in X3 in any way ... and I am not sure if/why permissions are inherited through your upload, but they certainly should not be ... The main issue here is that someone- or somehow your folders are getting 775 permissions after upload, and this has nothing to do with X3.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14469
Joined: 30 Sep 2006, 03:37

Re: v0.5 - folders /app/ and /panel/ with 775 instead of 755

29 Nov 2014, 06:34

It could be that permissions somehow are inherited through from us, to your desktop, and then also up to the server ... although that is irregular. I might need to make sure default permissions before I zip the file are standard defaults ...

I can see now that those permissions you have in your screenshot are the same that I happened to have on the folders locally here before zipping them.

Thanks for the heads-up ...
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

Re: v0.5 - folders /app/ and /panel/ with 775 instead of 755

29 Nov 2014, 07:24

No worries. I just thought someone who uploads the zip and extracts it on the server itself might face the issue too so I posted the solution :-) (maybe not everyone has access to the Apache logs which leads to the solution).
If you've got nothing else to do, you could add the two checks for the app & panel folder in the /check-module too ;-)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14469
Joined: 30 Sep 2006, 03:37

Re: v0.5 - folders /app/ and /panel/ with 775 instead of 755

29 Nov 2014, 09:06

RBachmann wrote:If you've got nothing else to do, you could add the two checks for the app & panel folder in the /check-module too ;-)
You mean check for permissions for those folders? That won't help diagnose anything, because first of all there is nothing "wrong" in 775 except for on your server and possibly a few others with similar restrictions. Some writable folders NEED 775 on some servers ... Furthermore, some servers have default permissions which are even stricter, but still work fine, so we can't make any assumptions based on the chmod value ...

We normally check for isWritable, to diagnose what permissions are required for X3 to be able to write to them. We cannot detect if any specific permission combo will create an error on your server though ...