I have a windows share created using samba .
It is located in my ubunutu server /mnt/user_new
I want to copy files from /var/www/myproject/files/
to /mnt/user_new/files
. This is for backup my files . and delete the original files .
I am using PHP . form PHP i tried
$file = '/var/www/html/bmw/myproject/files/0000000.pdf';
$newfile = '/mnt/user_new/0000000.pdf';
if (!copy($file, $newfile)) {
echo "failed to copy $file...\n";
}
But i get a permission denied error .
Severity: Warning
Message: copy(/mnt/user_new/0000000.pdf) [function.copy]: failed to open stream: Permission denied
Is there any way to copy files from my Linux server to windows share . I have a username and password for access window share , but i don't know how to use it here . is there any way i can pass username and password .
To be honest this is my first time working with Samba , and the windows share is created by Network administrator . I have spent nearly 8 hours for this simple copy . but could not do .
Please help me . thanks in advance .