Aman Sharma
Aman Sharma

Reputation: 287

Models permission in Yii2

I need to give 766 permission to common/models in order to generate files using gii module. But when I do that 'Class 'common\models\User' not found' error is thrown. It only works for 755 permisson. What is the problem?

Upvotes: 2

Views: 335

Answers (1)

Ali Tavafi
Ali Tavafi

Reputation: 533

766 permission does work only when the file owner is the web server (apache). So 766 wont work if the web server is not the owner of the directory.

766 means:

Owner can: Read/Write/Execute.
Group can: Read/Write.
Public can: Read/Write.

755 means:

Owner can: Read/Write/Execute.
Group can: Read/Execute.
Public can: Read/Execute.

Upvotes: 7

Related Questions