Skip to content

Commit

Permalink
Dev: It's OK to use 0777 (see note)
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 24, 2021
1 parent 21e877d commit 74f3853
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -59,8 +59,8 @@ public function move($destdir)
throw new Exception(gT('Temporary folder does not exist.'));
}

// TODO: Correct permission?
mkdir($destdir, 0760, true);
// NB: mkdir() always applies the set umask to 0777. See https://www.php.net/manual/en/function.mkdir
mkdir($destdir, 0777, true);

if (!is_writable(dirname($destdir))) {
throw new Exception(gT('Cannot move files due to permission problem. ' . $destdir));
Expand Down

3 comments on commit 74f3853

@olleharstedt
Copy link
Contributor Author

@olleharstedt olleharstedt commented on 74f3853 Feb 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shnoulle If you want, test plugin zip upload, install and activate/run.

I have a pretty special config with php inside docker, and uploaddir inside /tmp/upload/

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a suphp :( i have acl (it work always) and another one with apache , but www for user for all action.

@olleharstedt
Copy link
Contributor Author

@olleharstedt olleharstedt commented on 74f3853 Feb 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only have to test that uploaddir path alias works fine, that is, as before, even without a specific uploaddir config

Please sign in to comment.