Internal Error: Unable to create folder to store uploaded files, check the permissions of the parent directory


#1

Issue from Github repository: https://github.com/kanboard/kanboard/issues/3926

I cannot upload, remove or download files anymore. It reports:

Warning: stat(): stat failed for /…/app/ServiceProvider/ObjectStorageProvider.php on line 35
Internal Error: Unable to create folder to store uploaded files, check the permissions of the parent directory
(file=/…/data; mode=0; uid=0; gid=0)

Data folder has 0777 permissions. Sub folders have 0777 and files have 0755. Based on the manual no further permissions have to be set, right?

Thanks for your help in advance


#2

This appears to be an issue with SQLite I think. I switched over to MySQL instead and the upgrade seemed to work. This is just a guess though.


#3

looks to me like the first error is the one that is the issue:
[21-May-2018 15:46:22 UTC] PHP Fatal error: Uncaught exception 'PicoDb\SQLException' with message 'SQL Error: SQLSTATE[HY000]: General error: 1 no such table: sessions'

no sessions = no permissions.


#4

Hi,
i am using MySQL and i dont get the PicoDb\SqlException. I am seeing the mentioned warning, if i try to upload a file and look up the response in the Chrome browser/Network view.


#5

not really a lot of info to go on then, if it doesn’t actually relate to the kanboard issue linked.

I would ensure that the data dir is defined in config correctly, and although 0755 appears to be applied, make sure it has the correct ownership, chown -R root:root /path/to/data/, probably chown the entire app folder come to think of it…


#6

I made a mistake. The path to DATA_DIR in config.php was invalid and pointed to the wrong directory. Problem solved by using

__DIR__.’/data’

instead of a fixed path.

Thanks for your time!