Avatar uploaded file CHMOD question...

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
User avatar
raykai
Registered User
Posts: 90
Joined: Tue Apr 09, 2013 5:32 am

Avatar uploaded file CHMOD question...

Post by raykai »

what code do i need to change in phpbb for the files in /images/avatars/upload/ to be uploaded with CHMOD permissions to 644 instead of the default 600 permissions ?

phpbb seams to be hardcoded to add CHOMD 600 for files in the /images/avatars/upload/ folder i need all avatars being uploaded my users to be 644 as i need to use thos images on an other website. that dont have the same Owner permission but is in the same Group permission as phpbb.

i did change my .htaccess for the other website to have access but im blocked as for file permission.
User avatar
Mick
Support Team Member
Support Team Member
Posts: 22753
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket probably.

Re: Avatar uploaded file CHMOD question...

Post by Mick »

"The more connected we get the more alone we become" - Kyle Broflovski©
User avatar
raykai
Registered User
Posts: 90
Joined: Tue Apr 09, 2013 5:32 am

Re: Avatar uploaded file CHMOD question...

Post by raykai »

thats just for the folders settings thats not what i need...

phpbb allays uploads avatars files as 600 permission no mater what i do.
User avatar
Dragosvr92
Registered User
Posts: 1451
Joined: Sat Sep 12, 2009 7:27 am
Location: Romania
Name: Dragos Valentin Rădulescu
Contact:

Re: Avatar uploaded file CHMOD question...

Post by Dragosvr92 »

I see that the avatars on my board are uploaded as 666. But there are some avatars that are 600. I wonder if phpbb may set the chmod permissions while uploading, but it is most probably just a server related issue..... Does it cause troubles with 600 permissions, are users unable to change their avatar because of it?
Formerly known as TheKiller
3.0| Avatar on Memberlist 1.0.3
User avatar
raykai
Registered User
Posts: 90
Joined: Tue Apr 09, 2013 5:32 am

Re: Avatar uploaded file CHMOD question...

Post by raykai »

Still waiting on a response to know if its phpbb that sets em to 600 and if so how to chang phpbb code line for an other permission like 666 I think there is a CHOMD code In Phpbb that sets it too 600 I don't think it's the server.
User avatar
Lumpy Burgertushie
Registered User
Posts: 68122
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Avatar uploaded file CHMOD question...

Post by Lumpy Burgertushie »

I believe that is a server software setting of your host.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Avatar uploaded file CHMOD question...

Post by canonknipser »

Just had a quick look in the code (function phpbb_chmod in functions_php). As far as i understand, it seems to check if the file owner of common.php and the process users running the web server are the same. If they are the same, there is no need (from the view of phpBB) to allow others to access uploaded files: Permissions are set to "600".
If the users differ, permission are set to "644" ("666" would be too much, reading for group/others is enough as long as the owner = web server user has write access).
So, try to change the owner of common.php to a different user (don't forget permission "644" ) and all newly uploaded files should also get "644".
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: Avatar uploaded file CHMOD question...

Post by 2600 »

Question: Since 644 gives the owner execute permission. Why would one need that?
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
canonknipser
Registered User
Posts: 2096
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Avatar uploaded file CHMOD question...

Post by canonknipser »

Execute would be 744 (remember, it is a octal-code: 4 means read, 2 means write, 1 means execute, written as bits it is 100 for read, 010 for write and 001 for execute, for the resulting rights they are combined by logical "or" ), the first octet is the owner, the second the group, the third "others"
Owner octet 6 = 4+2 = read + write
Group octet 4 = read
others octet 4 = read


execute bit set on directory means: can enter directory

For a complete description see https://en.wikipedia.org/wiki/File_syst ... c_notation
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB
Locked

Return to “[3.1.x] Support Forum”