C
C
cmx2014-02-25 15:58:24
Yii
cmx, 2014-02-25 15:58:24

PHP: mkdir why permission denied at 0777?

The yii framework tries to create a new asset, executes
mkdir('.../assets/dbc89a08', 0511);
and gets permission denied. Rights to the assets folder 0755. I do:
#chmod -R 0777 assets
and I still get the same permission denied.
Php-fpm runs under the current user, i.e. in config:

user me;
group me;

Actually the question is, what is happening and why do I get permission denied in folder 0777?
Upd: even if the whole project with the framework is in 0777, it's still PermsDenied.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
C
cmx, 2014-02-25
@cmx

The problem was in the SELinux Policy, thanks @Sander_Li
Solution:
Taken from: stackoverflow.com/questions/13908722/php-unable-to...
More can be seen here: https://coderwall.com/p/uahuma

A
Alexander Litvinov, 2014-02-25
@Sander_Li

Might be worth clarifying? posix_getpwuid and posix_geteuid

V
Vadim Yakovlev, 2014-02-25
@FrimInc

... at the beginning of the path, is this for your example, or are you really writing three dots?
And right is good, but who owns the folder?
what is the cost of open_basedir for you?

A
Alexander Litvinov, 2014-02-25
@Sander_Li

Is there enough disk space?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question