Bludit file permissions

Post Reply
Mark11
Jr. Bludit
Posts: 4
Joined: Wed Apr 21, 2021 1:45 pm

Today I discovered that all of the images on my blog were deleted. All files and directories inside "blog/bl-content/uploads/pages" were gone. When I checked my file permissions I saw that my entire blog was set to 777.

I researched file permissions and realized my mistake. I changed permissions for the whole blog from 777 to 755, however then I could not upload any content onto the blog, or make any changes.

The only way that I can upload images onto my blog is by setting the permissions for "blog/bl-content/uploads/pages" back to 777. If I change the permissions for this directory to 755 then I can't upload any images. Is this directory supposed to have the permissions 777?

I have spent many hours trying to fix this and can't figure it out. I have tried searching this forum and Google but couldn't find an answer. I would really appreciate any help with this.

Thanks.
lightmat
Sr. Bludit
Posts: 46
Joined: Fri Feb 21, 2020 10:53 pm

You need to tell a little about your setup.
Is your website hosted?
Is it your own server where you host at home?
Which server are you talking about? (Apache, Nginx, other ..?)
I would prefer that if it is a production server that directories are set to 755 and files are set to 644
Both server user and server group must have a read/write permission where you serve your website from. e.g. /var/www/html or similar
Mark11
Jr. Bludit
Posts: 4
Joined: Wed Apr 21, 2021 1:45 pm

lightmat wrote: Wed Apr 21, 2021 10:54 pm You need to tell a little about your setup.
Is your website hosted?
Is it your own server where you host at home?
Which server are you talking about? (Apache, Nginx, other ..?)
I would prefer that if it is a production server that directories are set to 755 and files are set to 644
Both server user and server group must have a read/write permission where you serve your website from. e.g. /var/www/html or similar
Hello, thanks for replying. The blog is being hosted by NearlyFreeSpeech.NET which is shared hosting. The server is Apache 2.4 with PHP version 7.2. The Bludit version that I'm using is 3.7.1. I have attached the result of phpinfo() and my current file permissions to this post.

I don't really understand these file permissions, but unless the /uploads/pages directory is set to 777 I can't upload any images. Is this a problem with my hosting?
Attachments
permissions.jpg
permissions.jpg (134.76 KiB) Viewed 2467 times
Phpinfo
Phpinfo
phpinfo.jpg (217.59 KiB) Viewed 2467 times
Mark11
Jr. Bludit
Posts: 4
Joined: Wed Apr 21, 2021 1:45 pm

My other website had all the blog files set to 777 also. I changed the ownership of everything in "/bl-content" from "web web" to "me web" and now I can't upload any files using Bludit. In order to change the file permissions I first had to change the ownership from "web web" to "me web". Maybe this problem is caused by the ownership? Do I need to have "/bl-content" owned by the web?
lightmat
Sr. Bludit
Posts: 46
Joined: Fri Feb 21, 2020 10:53 pm

Mark11 wrote: Thu Apr 22, 2021 11:09 am My other website had all the blog files set to 777 also. I changed the ownership of everything in "/bl-content" from "web web" to "me web" and now I can't upload any files using Bludit. In order to change the file permissions I first had to change the ownership from "web web" to "me web". Maybe this problem is caused by the ownership? Do I need to have "/bl-content" owned by the web?
I can not answer that, because it depends on how your hosting company has set up their web hotel.
In general, the web server runs under a given user and a given group, which forms the basis for who can read / write / execute on the server
lightmat
Sr. Bludit
Posts: 46
Joined: Fri Feb 21, 2020 10:53 pm

Mark11 wrote: Thu Apr 22, 2021 9:24 am
lightmat wrote: Wed Apr 21, 2021 10:54 pm You need to tell a little about your setup.
Is your website hosted?
Is it your own server where you host at home?
Which server are you talking about? (Apache, Nginx, other ..?)
I would prefer that if it is a production server that directories are set to 755 and files are set to 644
Both server user and server group must have a read/write permission where you serve your website from. e.g. /var/www/html or similar
Hello, thanks for replying. The blog is being hosted by NearlyFreeSpeech.NET which is shared hosting. The server is Apache 2.4 with PHP version 7.2. The Bludit version that I'm using is 3.7.1. I have attached the result of phpinfo() and my current file permissions to this post.

I don't really understand these file permissions, but unless the /uploads/pages directory is set to 777 I can't upload any images. Is this a problem with my hosting?

Contact your hosting company as it is their setup and you will get the best answer there.
It's impossible for me to give you a correct answer as I have no knowledge of their setup, but it sounds very strange and rather uncertain that you should give permission for everything
Mark11
Jr. Bludit
Posts: 4
Joined: Wed Apr 21, 2021 1:45 pm

lightmat wrote: Thu Apr 22, 2021 11:28 am
Mark11 wrote: Thu Apr 22, 2021 9:24 am
lightmat wrote: Wed Apr 21, 2021 10:54 pm You need to tell a little about your setup.
Is your website hosted?
Is it your own server where you host at home?
Which server are you talking about? (Apache, Nginx, other ..?)
I would prefer that if it is a production server that directories are set to 755 and files are set to 644
Both server user and server group must have a read/write permission where you serve your website from. e.g. /var/www/html or similar
Hello, thanks for replying. The blog is being hosted by NearlyFreeSpeech.NET which is shared hosting. The server is Apache 2.4 with PHP version 7.2. The Bludit version that I'm using is 3.7.1. I have attached the result of phpinfo() and my current file permissions to this post.

I don't really understand these file permissions, but unless the /uploads/pages directory is set to 777 I can't upload any images. Is this a problem with my hosting?

Contact your hosting company as it is their setup and you will get the best answer there.
It's impossible for me to give you a correct answer as I have no knowledge of their setup, but it sounds very strange and rather uncertain that you should give permission for everything
Ok thanks.
lightmat
Sr. Bludit
Posts: 46
Joined: Fri Feb 21, 2020 10:53 pm

No Problem :)
Post Reply