I can copy file but can not move it on my Mac Terminal.

I want to execute following command:

mv /apps/gfss/ipt/files/R2R/Japan_WHT/21940000/DATA.xlsx /apps/gfss/ipt/files/R2R/Japan_WHT/21940000/inprogress/

And I get following error:

mv: rename /apps/gfss/ipt/files/R2R/Japan_WHT/21940000/DATA_21940000.xlsx to /apps/gfss/ipt/files/R2R/Japan_WHT/21940000/inprogress/DATA_21940000.xlsx: Permission denied

However, if I use Finder, I can move it. But I want to do this from Terminal.

But, I am able to copy:

cp /apps/gfss/ipt/files/R2R/Japan_WHT/21940000/DATA.xlsx /apps/gfss/ipt/files/R2R/Japan_WHT/21940000/inprogress/

Wondering what is that I am doing wrong!?

Below is the ls -ltr output:

gfss-apac-ipt2:21940000 admin$ pwd

gfss-apac-ipt2:21940000 admin$ ls -ltr
total 384
-rw-r--r--@ 1 alokur  wheel  193385 Nov 22 12:09 DATA_21940000.xlsx
drwxr-xr-x+ 2 admin   wheel      68 Nov 22 13:08 inprogress

P.S.: Move does not work even when I do chmod 777 inprogress; and I get same error.

  • Oh, negative voter, care to comment please? Negative voting without suggestions for improvement is bad and rather arrogant. Everyone is not perfect! I could not find solution on Google so asked here. – Akshay Lokur Nov 22 '17 at 5:23
  • You need an -a and an -e on that ls command. – JdeBP Nov 22 '17 at 6:45
  • I didn’t downvote, but (1) It’s just common sense (and common courtesy) to do cd /apps/gfss/ipt/files/R2R/Japan_WHT/21940000 && mv DATA.xlsx inprogress/, to eliminate the /apps/gfss/ipt/files/R2R/Japan_WHT directory path as being part of the problem, and to give us a shorter command to have to look at.  (2) If you know anything about Unix permissions, you know that permission to move a file between directories depends on write permission to the source and target directories, … (Cont’d) – G-Man Says 'Reinstate Monica' Nov 24 '17 at 21:24
  • (Cont’d) …  so you should have used the -a option in your ls command to show us the mode of . (the source directory). (3) And even if you don’t know enough to do it on your own initiative, you should have done it when you were asked to. (4) If you know anything about ls, you know that @ and + as the 11th character of a mode string indicates the presence of ACLs and/or other attributes, and you should have showed us those. (5) Permissions depend on identity. Your ls output shows that you are trying to move a file owned by alokur … (Cont’d) – G-Man Says 'Reinstate Monica' Nov 24 '17 at 21:24
  • (Cont’d) …  into a directory owned by admin and protected 755 (full permission to the owner, admin, and read-only permission to everybody else) but you don’t say what user id you are running as. (6) This may be nitpicking, but, since you asked for suggestions for improvement: You say you are having a problem with a command that tries to move a file called DATA.xlsx, but your ls output doesn’t show that file — it shows some other file, named DATA_21940000.xlsx. – G-Man Says 'Reinstate Monica' Nov 24 '17 at 21:24


I had to delete the folder /apps/gfss/ipt/files/R2R/Japan_WHT/21940000 and recreate it. Then I cd to /apps/gfss/ipt/files/R2R/Japan_WHT/ and gave permission to 21940000 directory using chmod -R 777 21940000/

I think there was some hidden directory inside 21940000 created by some other user and hence I was unable to do chmod before.

| improve this answer | |

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