Link to home
Start Free TrialLog in
Avatar of YZlat
YZlatFlag for United States of America

asked on

Cannot move a file on Unix

I am trying to move a file into a subdirectory:

mv myfile.txt /MyDir

and getting an error:

mv: /MyDir: The file access permissions do not allow the specified action

The permissions are as follows:

drwxr-xr-x    2 oracle   dba             256 May 20 16:23 MyDir
-rwxr--r--    1 oracle   dba      14327181312 May 20 16:32 myfile.txt
Avatar of ozo
ozo
Flag of United States of America image

are you oracle?
On the off chance this is an easy one, are you logging in as the user oracle? Have you tried using sudo?
Run who
ls -l myfile.txt
getfacl myfile.txt
The issue might be you do not have rights on myfile.txt.

Try cp first?

An mv is a copy and delete the original.
you might also check ls -ld .
df -k
Is /MyDir its own partition?

Wait a second, why are you using /MyDir?

mv myfile.txt MyDir
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of YZlat

ASKER

Thanks!
arnold was the first to suggest that you might not have meant to move the file to /MyDir