I’ve been having fun using my Bookstack instance but unfortunately there are permission issues when uploading images. Filesystem Permissions · BookStack states:
storage/
bootstrap/cache
public/uploads
will need to have 775 permission level. I did the same via FileZilla FTP but I still get issues such as: https://rentry.org/d4dwaktz Any newly created subdirectories like public/upload/images/user/2024-12 are created with 755 permission level. Uploaded images arecreated with a 666 permission level.
After contacting with the dev behind Bookstack, I was told that “The call to set permissions via PHP is likely what is failing. Not sure exactly why that occurs, could be due to owner/group rights (hard to understand what’s correct for your environment based upon these screenshots) or could even be due to such actions being prevented in certain environments.”
Uploaded media:
I have read the forum and from what I can gather having such strict permission monitoring is not the greatest idea on a shared hosting, but Bookstack is meant to host data that shouldn’t be accessible by the general public so is pretty touchy. I would appreciate any help!
Free hosting prevents the editing of permissions. The reason is because 99% of people incorrectly make changes, lock themselves out, and ask us for help (But we can’t do anything except tell them they have start over). To prevent this from happening, the server admins disabled CHMOD functionality.
Unfortunately, this prevents some software from working correctly.
You can either upgrade to a premium account that does not have this restriction, find different software, or accept that permission editing cannot be done on free hosting.
Note: I am not 100% sure this is the core issue here, but it is my best guess with the understanding I have of the free hosting system. You may wish to allow other to confirm / contradict me.
I’m not entirely sure if permissions features were completely disabled through FTP. I know they were disabled in PHP and in the file manager.
The important thing to understand is that we run PHP code as your account user. That means that your PHP code is always able to write to all files and directories (within the htdocs folder of your website). You do not need to change any directory permissions to make that work.
Only if the software was built poorly. 755 permissions are sufficient for websites to write their own code. Only if the software specifically checks that the permissions are set to exactly 775 (due to a misguided sense that this is necessary) would this cause problems.
To be clear, BookStack only thinks it can’t write to those directories, because it actually can.
Appreciate the response, I guess untill the dev adds an option to ignore permission requirements there is not much I can do and have to resort to having the default images