Uploaded File Permissions

Open to all! Ask other shopowners for help.
Post Reply
User avatar
mhsuffolk
Contributor
Posts: 199
Joined: Sat Oct 26, 2019 9:13 am
Phoenix Version: v1.1.0.6
Has thanked: 13 times
Been thanked: 11 times

Uploaded File Permissions

Post by mhsuffolk »

For the last 3 or 4 years all the image files that Phoenix uploads to my site have the file permission set to 0777 presumably by Phoenix.
I notice in admin\includes\classes\upload PHP there is;

Code: Select all

public function __construct($file = '', $destination = '', $permissions = '777', $extensions = '') {
Should the 777 be 644?

The copyright date of this file is 2021 so was the previous method 777?


Join The Code Co-op to get access to your library in the Code Co-op Forum
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Uploaded File Permissions

Post by ecartz »

mhsuffolk wrote: Wed Jan 01, 2025 10:23 am was the previous method 777?
Yes, it's always been 777.

You can try changing it to 644 or even 600 if you like. Not sure that it makes much difference, as the vulnerable thing is the web server, which will have the 6 in that scenario. There may be some shared server scenarios where it matters.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply