0

I've installed xampp on my MacBook with macOS 10.12, Sierra. Everything works fine, but I created php app with slim framework witch creates cache files.

The problem is that I have no permissions to these files, I can not delete them because this files belongs to user daemon.

I've tried to change user in xampp https.conf but when I change user to my username apache will not start:

ERROR: Failed to restart "apache": cannot stop service: AH00543: httpd: bad user name

Anybody know how to deal with this problem?

UPDATE:

folder path is nfs://192.168.64.2/opt/lampp/htdocs/2017/cache

I try this command when I am in 2017 folder:

sudo chmod -R +a "staff allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" cache

And i get

chmod: Failed to set ACL on file 'cache': Operation not supported

chmod: Failed to set ACL on file '5d': Operation not supported

chmod: Failed to set ACL on file 'dc': Operation not supported

chmod: Failed to set ACL on file '5ddcda0f8a5b896924f37eaa7d4701bffab1d462': Operation not supported

sudo chmod -R 777 cache

chmod: Unable to change file mode on cache/5d: Operation not permitted

chmod: Unable to change file mode on cache/5d/dc: Operation not permitted

chmod: Unable to change file mode on cache/5d/dc/5ddcda0f8a5b896924f37eaa7d4701bffab1d462: Operation not permitted

UPDATE

Problem solved by install older version of xampp witch files are not in network shared folder but in /Applications/Xampp

There is no problem with virtual hosts and folders permissions

  • I have updated my question – Piotr Sep 18 '17 at 16:17
1

Network Drive Limitation

You likely can not change the permissions of using the network shared drive, nfs, path. Instead use the approach below on the Mac involved, using the local paths.

Changing Permissions

You can grant yourself access to the daemon's files using the Finder's Get Info panel.

macOS Get Info

  1. Within the Finder, select the folder you want access to;
  2. Select File (menu) > Get Info;
  3. Within Sharing & Permissions click the + and add your user account;
  4. Within Sharing & Permissions click the cog and select Apply to enclosed items.

You may need to unlock the permissions settings using the Lock on the lower-right of the panel.

Command line approach

Alternatively, you can use the command line to change permissions, see Permissions for new files in shared directory. The command line approach is more capable and allows sudo to ensure you have permissions to make the change.

Locked files and chmod errors

See Why does chown report “Operation not permitted” on OS X?

  • 1
    Thx, but when i try to do this, I get: The operation can’t be completed because you don’t have the necessary permission. – Piotr Sep 18 '17 at 15:26
  • See the updated answer mentioning a sudo command line approach; this should ensure you have appropriate permissions – assuming System Integrity Protection (SIP) is not stopping you. – Graham Miln Sep 18 '17 at 15:35
  • When i try this command i get: chmod: Failed to clear ACL on file cache: Operation not supported chmod: Failed to clear ACL on file 5d: Operation not supported chmod: Failed to clear ACL on file dc: Operation not supported chmod: Failed to clear ACL on file 5ddcda0f8a5b896924f37eaa7d4701bffab1d462: Operation not supported – Piotr Sep 18 '17 at 16:02
  • Please could you edit your question and add the path to the files you want to change and the complete chmod command you are seeing errors from. – Graham Miln Sep 18 '17 at 16:06
  • ok, question is updated – Piotr Sep 18 '17 at 17:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .