matheusronanabel's avatar

Symlink(): Operation not permitted

Hi! I'm running on a Centos Webpanel (CWP), I'm currently logged in as a root, and I was trying to run a php artisan storage:link command, but it doesn't seem to work, and it throws me an error that says:

In Filesystems.php line 340: Symlink(): Operation not permitted

Can someone help me to solve this issue?

0 likes
1 reply
LaryAI's avatar
Level 58

This error occurs when the user running the command does not have the necessary permissions to create a symlink. To fix this, you can try running the command with sudo or change the ownership of the storage directory to the user running the command.

Here's an example of how to change the ownership of the storage directory:

sudo chown -R yourusername:yourusername storage

Replace "yourusername" with the username of the user running the command.

If this doesn't work, you may need to check the permissions of the parent directory and make sure the user has write permissions.

sudo chmod -R 775 /path/to/parent/directory

Replace "/path/to/parent/directory" with the path to the parent directory of the storage directory.

Once you've made these changes, try running the command again.

Please or to participate in this conversation.