Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Wed Sep 10, 2014 3:30 pm
svasti wrote:content/ is executable, readable and writable by the PHP user, and PHP can create files, write and delete everything. However, if PHP creates a new folder for a secondary language, it cannot create files in that folder, whatever permissions you give to the folder.
That's really strange. Is
safe_mode enabled on this server?
svasti wrote:The problem is the "owner" of the folder.
cmb wrote:The solution is simple: just call chmod() directly after mkdir()
Tried it, but doesn't work if the owner isn't right.
Yes. However, if the file has been created by PHP the owner of the file should be the PHP user.
-
svasti
- Posts: 1659
- Joined: Wed Dec 17, 2008 5:08 pm
Post
by svasti » Mon Nov 17, 2014 10:33 pm
cmb wrote:Is safe_mode enabled on this server?
Yes and it cannot be changed.
cmb wrote:However, if the file has been created by PHP the owner of the file should be the PHP user.
The php user is somehow made powerless in these hosting packages. The folders created by the php user are completely useless as CMSImple_XH cannot create files in them.
However if I upload a folder via ftp, CMSimple can create files in this folder.
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Tue Nov 18, 2014 11:21 am
svasti wrote:cmb wrote:Is safe_mode enabled on this server?
Yes and it cannot be changed.
Ah, I see. Anyhow, this should be changed, and it most likely will in the not too distant future, as safe_mode has been deprecated since PHP 5.3 and removed as of PHP 5.4, and
PHP 5.3 already is EOL'd. Therefore I'm not really concerned about working around issues caused by safe_mode. We should, however, document such issues (maybe a system check with a warning would be appropriate, too).
-
svasti
- Posts: 1659
- Joined: Wed Dec 17, 2008 5:08 pm
Post
by svasti » Tue Nov 18, 2014 1:41 pm
Server is php 5.3.3-7+squeeze15
cmb wrote:We should, however, document such issues (maybe a system check with a warning would be appropriate, too).
Seems to be a good idea, as this server gave me quite some headaches with my own plugins, as they couldn't create the default plugin data files under userfiles, when they had to create first the respective plugin folder.
I 've added "check for save mode=on" on the roadmap
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Fri Nov 21, 2014 1:16 pm
svasti wrote:I 've added "check for save mode=on" on the roadmap
Thanks.
I have added a brief note regarding safe mode to the
Filesystem Permissions article in the Wiki.
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Tue Dec 16, 2014 5:10 pm
I tend to agree (the link should probably point to
http://www.cmsimple-xh.org/wiki/doku.ph ... l_websites, though).
I assume the real problem is the
change of the folder layout since XH 1.6; long-term users simply don't expect this change (neither when upgrading nor when setting up a new site), because it worked (slightly) different for so many years.
Anyway, I just re-read the complete thread and had a look at the voting, and it seems to me that we have to "yes" votes for different solutions. Not sure how to solve that, if the voting passes.
-
svasti
- Posts: 1659
- Joined: Wed Dec 17, 2008 5:08 pm
Post
by svasti » Tue Dec 16, 2014 5:48 pm
cmb wrote:and it seems to me that we have to "yes" votes for different solutions. Not sure how to solve that, if the voting passes.
cmb wrote:Another option would be to automatically move the necessary folder and files to content/, if a second language is accessed, and the structure is not already there, but still resides in 2lang/.
isn't it this what the voting is about? Well, not sure any more about if it should be done or not, because once you get use to the new way to create secondary languages, it seems to be quite clear.
-
cmb
- Posts: 14225
- Joined: Tue Jun 21, 2011 11:04 am
- Location: Bingen, RLP, DE
-
Contact:
Post
by cmb » Tue Dec 16, 2014 6:52 pm
svasti wrote:cmb wrote:Another option would be to automatically move the necessary folder and files to content/, if a second language is accessed, and the structure is not already there, but still resides in 2lang/.
isn't it this what the voting is about?
Well, I had written "
another option", so there must have been a first one, at least.
That option was Tata's suggestion to rename the folders, and I assume his "yes" is for this option.
-
Holger
- Site Admin
- Posts: 3470
- Joined: Mon May 19, 2008 7:10 pm
- Location: Hessen, Germany
Post
by Holger » Fri Dec 19, 2014 10:11 am
cmb wrote:Well, I had written "another option", so there must have been a first one, at least.
That option was Tata's suggestion to rename the folders, and I assume his "yes" is for this option.
Hmm, thought the voting was made for that option:
http://cmsimpleforum.com/viewtopic.php? ... 625#p37628
see here:
http://cmsimpleforum.com/viewtopic.php? ... =10#p37638 -- and this solution gets my vote
.
Tata's suggestion is not bad at all, but IMO it seems to be better to write a better documentation than changing the foldernames once again.