Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
photos
Commits
cbddb793
Commit
cbddb793
authored
Jun 26, 2014
by
Tobias Reich
Browse files
Merge pull request #174 from reneluria/master
loosen perms for fpm
parents
f590f72b
a5288f96
Changes
1
Hide whitespace changes
Inline
Side-by-side
php/modules/misc.php
View file @
cbddb793
...
...
@@ -120,6 +120,9 @@ function get_hashed_password($password) {
function
hasPermissions
(
$path
,
$permissions
=
'0777'
)
{
/* assume that if running with the same uid as the owner of the directory it's ok */
$stat
=
@
stat
(
$path
);
if
(
$stat
&&
(
$stat
[
'uid'
]
==
getmyuid
()))
return
true
;
if
(
substr
(
sprintf
(
'%o'
,
@
fileperms
(
$path
)),
-
4
)
!=
$permissions
)
return
false
;
else
return
true
;
...
...
@@ -157,4 +160,4 @@ function fastimagecopyresampled(&$dst_image, $src_image, $dst_x, $dst_y, $src_x,
}
?>
\ No newline at end of file
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment