Direct Admin refusing changing permissions by laravel

moaaz

New member
Joined
Jul 26, 2023
Messages
1
Hello
I have a laravel project, and I'm using Laravel media library package. By default, Laravel's laravel-medialibrary package stores files with the default permissions set by the underlying file system, which is typically 0700 for directories and 0600 for files. I'm trying to change the directories permissions by using this listener
public function handle(MediaHasBeenAdded $event) { $media = $event->media; // Get the path of the directory where the media and its conversions are stored $directoryPath = dirname($media->getPath()); // Set the desired permissions for the directories $permissions = 0755; // Change this value to the desired permissions (e.g., 0755 for read/write/execute for owner and read/execute for others) // Change the permissions recursively for the directory and its subdirectories File::chmod($directoryPath, $permissions, true); }
The problem is, the directories permissions still 0700.
Where is the problem?
 
Weird, standard permissions are 755 for directory's and 644 for files.
Try to reset your permissions to the default one, search forum for the SSH command
 
You mean this command?

Code:
find /home -type d -exec chmod 755 {} \;
find /home -type f -exec chmod 644 {} \;
 
Back
Top