0

I want to use file_copy to copy a file from Drupal public directory to a shared folder of another

computer on the same network. I can access the shared folder by Finder (Drupal is installed on

MAMP) but coping files in that directory gives me the same error:

The specified file public://file.pdf could not be copied, because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. More information is available in the system log.

The shared folder is totally writable. I tryed putting an alias on httpd.conf but no luck Could it be an apache permission problem? Or can I solve the problem within Drupal?

Thanks a lot

0

Go to the MAMP console under "General" tab, go to the setting for "Run Apache/MySQL server as user".

It should be setting to www (Apache) / mysql (MySQL). So you need to change it to username (Apache) / username (MySQL).

Save and restart the servers

Refresh the browser, then change it back to www (Apache) / mysql (MySQL), save and restart, and everything should be working

  • No luck...Is there an exact way to write the destination for the network folder in flie_copy function? – Ponzio Pilato Nov 3 '16 at 10:50
  • No idea, sorry.. – DarkteK Nov 3 '16 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.