-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attachments are created without user read permission (--w-rwSr--) #723
Comments
To clarify: This issue does not affect the usability of the Faveo software itself, attachments work fine within Faveo itself, but anything trying to access the files outside of the system, like a backup script, will fail. |
Can you please suggest a solution, we have these permission. We had changed permission due to security angle. Someone being able to upload malicious files and execute them. |
@bhanu2217 Apologies, I missed your reply somehow. Commit 03cdb39 introduced 2 broken Like I said above, any chmod To properly set the permissions to I am guessing the reason why this got through might be because passing "bad" permissions to PHP's I've submitted a pull request changing the |
The leading 0 is standard C notation to denote an octal value, which is what chmod conventionally uses. You should really express these values as 5 digits; a leading 0 then 4 more octal digits to represent the 12 bits of POSIX file permissions; i.e. 00644 in the intended case. 02264 octal is 1204 decimal, which is what you are seeing file permissions set to. |
Makes sense.
While this sounds sensible, there's no mention of this notation even on PHP.net.
Yeah makes sense. What I don't understand then is how this code even made it in in the first place, and how the developer ended up at |
mysqld Ver 5.5.41-MariaDB for Linux on x86_64 (MariaDB Server)
Description:
As of recent-ish versions, mail attachments are created without user read permissions.
For some reason setgid is also set.
The exact permissions set on attachments are now
--w-rwSr--
, or2264
.This causes, among other things, 3rd party backup scripts to fail.
Attachments, on a much older version of Faveo, used to be created with the (presumably inherited) permissions of
-rw-r--r--
.Steps To Reproduce:
storage/app/attachments/
.Downloaded from
master-branch
development-branch
release-tag
The text was updated successfully, but these errors were encountered: