News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

correct permissions to use

Started by daverj, September 20, 2019, 02:55:13 PM

Previous topic - Next topic

daverj

I have SMF 2.0.13 installed and noticed that when I click the link telling me that there is an update, that it can't find the update (says the file is empty). Other posts here say that is probably a permissions issue. I checked my permissions and I would have thought they were correct, so want to find out what permissions are really required to have the update package manager work correctly.

My forum is installed in a folder called "Forum" off of the public_html root folder. The "Forum" folder has permissions 750. All of the other folders under it are 755 (including Packages), and all the files are 644.

Interestingly, several posts say that the Attachments folder requires 777, but mine is set at 755 and is working just fine. I just posted a test post on the forum and attached a picture and it uploaded and displays fine. But the package manager is not showing any updates after 2.0.13, around 3 years ago, which is around the time I moved the forum to this current VPS that it's on.

Also, the Package Manager Downloads page shows two package servers labelled "Simple Machines Third-party Mod Site" but none for a main update server. Is that maybe the problem? Should there be one listed other than the two labelled "Simple Machines Third-party Mod Site"?

I can print out the PHPinfo information if there is a specific PHP setting that affects what permissions are required. I saw some posts saying that 755/644 were sometimes not enough and required folders to be 777. I'm assuming the situations that require that are because of specific PHP .ini settings. So if there are specific settings that require that, maybe somebody could tell me which and I'll check the PHPinfo to see if those are set here. Since it's a VPS I can change my own ini settings for PHP if needed.

Herman's Mixen

look here for the Large upgrade Package unpack and upload that to your forum and run upgrade.php in your browser or look here for the package manager updates :D
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

daverj

Thanks, but that's not really what I was asking. I'm aware of where the updates/upgrades can be downloaded from. But even in those, the details about permissions are not specific. The readme in the upgrades says sometimes you need these permissions, sometimes those, and other times these. But that is too vague.

I am trying to get a definitive answer about what it is that makes some servers require 755 and others require 777 (or 775). And how to determine that, other than simply setting it all to 777. There must be specific configuration things, either in Apache or in PHP configuration that define why one site requires 755 and another 777. Is there anybody here that knows what that might be? And what settings to change to be able to use 755 instead of 777?

Also, is it normal for the main folder containing the forum to have a different permission with the global bits all turned off (ie: 750). Everything in the SMF documentation talks about the permissions for the files and folders within that folder, but never mentions that folder itself. Since my forum seems to be working fine, except for the fact that the package manager can't seem to download anything, is it OK to leave that outer folder at 750?

Tonyvic

I am certainly not an expert but from my knowledge it depends how your server is set up, so not SMF specific.
@arantors answer in https://www.simplemachines.org/community/index.php?topic=556916.msg3946765#msg3946765 (Particularly Reply #5)

daverj

Thanks. I realize that it's the server config that is the issue. But somebody must understand what it is about the server or PHP config that defines which permissions are needed. I admin my own server, so can make all sorts of changes to it and the PHP etc.. running on it.

I'm just trying to find out what it is specifically in the server config that would allow SMF to be happy with 755 instead of 777.

shadav

I couldn't answer that but from experience some scripts are fine with 755, while others need 777
as to why, I couldn't tell you.... it's probably to do with security issues because 777 could lead to some major issues if left set at 777

Kindred

it has to do with how php is set up....

smf functions that allow files to be uploaded or processed use the "php user".
In some cases, this is root,
in some cases, this is the server user (e.g. your server account, the same on you use for FTP)
and in some cases, this is the nobody user...

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

And for bonus points, the owner of the PHP files is also going to be relevant in conjunction with whether the site is using suPHP, suExec, suHosin or something else as well.

Advertisement: