touch(): Utime failed: Permission denied

More
2 years 1 month ago #146960 by marcic
Hi,

after installing the newest version of LS (limesurvey2.58.0+170104) when finishing the installation and after the login screen, which showed an error was presented:

touch(): Utime failed: Permission denied

The directories: tmp/ upload/ have 777 permission. Anything lower than 777:
(e.g. chmod 766) gives an error: mkdir(): Permission denied,
while chmod 755: Application runtime path "..." is not valid. Please make sure it is a directory writable by the Web server process.

Should also probably mention that the directory owner is different from web user (the default apache). What is the thing that apache cannot perform in this instance? As I can see apache user does generate files and directories (tmp/assets/cache and tmp/runtime)

Best, Marcis

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #146966 by DenisChenu
Hi,

You must use chown maybe and not chmod.
Else : we try to test directory permission during install, seems to didn't work for you : can you report the bug please ?

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago #146982 by marcic
Hi Denis,

thank you for your reply. Unfortunately, the current server setup and privileges does not allow me using chown; not sure why such a policy but c'est la vie... One guess was that this might be the reason for the error. I could report a bug but what would be the bug about – not checking directory ownership during installation or allowing installation and afterwards not allowing to work? then in the manual it should also be specified - that the owner of directory should be the webserver and elevated permission such as 777 is not enough. Previously with the current server setup I had not experienced this issue in Version 2.06+ Build 151109 and also for Version 2.50+ Build 160421 and versions before those.

I noticed there was a discussion on this issue on github on another project but maybe for technical people this would make more sense: github.com/composer/composer/issues/4070

Do you think you can guide me to where I could probably fix the code related with touch() issue as a workaround?

Best,

Marcis
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
2 years 1 month ago - 2 years 1 month ago #146983 by DenisChenu
Hi,

In fact : we don't really need 'touch' / update utime. We need update mtime, on some server : update a file inside update mtime.

Maybe the best is :
- create a '.update' empty file in this directory
- delete the '.update' file just after

Then mtime was updated :)

Bug must be reported , and Pull request are welcome

www.limesurvey.org/community-services/bug-tracker

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 2 years 1 month ago by DenisChenu. Reason: mtime not ctime #2

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!