Discussion:
permission denied while copying files to an USB drive
(too old to reply)
happytoday
2010-10-06 12:30:37 UTC
Permalink
I am running backup.sh script that copy directories into an USB hard .
I got these error messages :

/export>./backup.sh
starting copying sources.d
cp: cannot create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
sql.d/mysql_5_ .gz: Not owner
cp: cannot create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
files.d/profil e: Permission denied
cp: cannot create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
files.d/profi0 00: Permission denied
cp: cannot create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
files.d/temp.s h: Permission denied

/export>cat backup.sh
echo "starting copying sources.d"
cp -r /export/home/unix.d/sources.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d
echo "starting copying tutorial.d"
cp -r /export/home/unix.d/tutorial.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d
echo "starting copying programs.d"
cp -r /export/home/unix.d/programs.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d
echo "starting copying scripts.d"
cp -r /export/home/unix.d/scripts.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d
echo "starting copying sources.d"
cp -r /export/home/unix.d/sources.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d
Chris Ahlstrom
2010-10-06 14:46:25 UTC
Permalink
Post by happytoday
I am running backup.sh script that copy directories into an USB hard .
/export>./backup.sh
starting copying sources.d
cp: cannot create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
sql.d/mysql_5_ .gz: Not owner
cp: cannot create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
files.d/profil e: Permission denied
Did you format the USB with a non-VFAT file system?
John Gordon
2010-10-06 15:52:44 UTC
Permalink
Post by happytoday
/export>./backup.sh
starting copying sources.d
cp: cannot create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
sql.d/mysql_5_ .gz: Not owner
cp: cannot create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
files.d/profil e: Permission denied
Do you have write permission on the /rmdisk/unnamed_rmdisk/MyWorks/unix.d/
file tree and own all the files in that tree?

If I'm interpreting it right, the first error message says that the file
/rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/sql.d/mysql_5_.gz already
exists and you don't have permission to overwrite it.

And I think the second message says that you don't have write permission on
the directory /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/files.d/ .
--
John Gordon A is for Amy, who fell down the stairs
***@panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
Sidney Lambe
2010-10-06 16:45:32 UTC
Permalink
I am running backup.sh script that copy [copies] directories
/export>./backup.sh starting copying sources.d cp: cannot
create /rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
sql.d/mysql_5_ .gz: Not owner cp: cannot create
/rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
files.d/profil e: Permission denied cp: cannot create
/rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/
files.d/profi0 00: Permission denied cp: cannot create
/rmdisk/unnamed_rmdisk/MyWorks/unix.d/sources.d/ files.d/temp.s
h: Permission denied
/export>cat backup.sh echo "starting copying sources.d" cp -r
/export/home/unix.d/sources.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d echo "starting copying tutorial.d" cp -r
/export/home/unix.d/tutorial.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d echo "starting copying programs.d" cp -r
/export/home/unix.d/programs.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d echo "starting copying scripts.d" cp -r
/export/home/unix.d/scripts.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d echo "starting copying sources.d" cp -r
/export/home/unix.d/sources.d /rmdisk/unnamed_rmdisk/MyWorks/
unix.d
Looks like maybe you have to run the script as root.

Sid

Continue reading on narkive:
Loading...