Solved

Cannot move a file on Unix

Posted on 2013-05-20
8
426 Views
Last Modified: 2013-05-21
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
0
Comment
Question by:YZlat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 39182591
are you oracle?
0
 
LVL 14

Expert Comment

by:quizwedge
ID: 39182596
On the off chance this is an easy one, are you logging in as the user oracle? Have you tried using sudo?
0
 
LVL 78

Expert Comment

by:arnold
ID: 39182906
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.
0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
LVL 84

Expert Comment

by:ozo
ID: 39183027
you might also check ls -ld .
0
 
LVL 78

Expert Comment

by:arnold
ID: 39183271
df -k
Is /MyDir its own partition?

Wait a second, why are you using /MyDir?

mv myfile.txt MyDir
0
 
LVL 84

Accepted Solution

by:
ozo earned 150 total points
ID: 39183413
If you really meant a subdirectory,  /MyDir might be considered more of a top level directory, unless you are considering it a subdirectory of /
But / seems a strange place to put myfile.txt
Or maybe that's why you want to move it.
0
 
LVL 35

Author Closing Comment

by:YZlat
ID: 39184108
Thanks!
0
 
LVL 84

Expert Comment

by:ozo
ID: 39184130
arnold was the first to suggest that you might not have meant to move the file to /MyDir
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question