2

I'm trying to change the ownership of a file on Ubuntu 10.04. This is the output from the terminal after typing in the following command:

mossen@mossen-desktop:/opt/openfoam211/platforms/linux64GccDPOpt$ ls
bin  lib
mossen@mossen-desktop:/opt/openfoam211/platforms/linux64GccDPOpt$ chown -R -H mossen:mossen '/opt/openfoam211/platforms/linuxGccDPOpt/lib'
chown: cannot access `/opt/openfoam211/platforms/linuxGccDPOpt/lib': No such file or directory
muru
  • 197,895
  • 55
  • 485
  • 740
Mohsen
  • 21

2 Answers2

2

You are doing it the windows way or something try:

sudo chown -R mossen:mossen ./lib

The -H is for changing symbolic links, the -R is for recursively changing sub folders the ./ means start here se output of your ls command. The quotes are used to fix names with white spaces of which you have none. Try this and remember the KISS rule: Keep It Simple Stupid There is no need to starte every command from the root, you risk affecting library's that was better left alone.

Ken Mollerup
  • 1,275
1

Just run:

sudo chown -R mossen:mossen /opt/openfoam211/platforms/linux64GccDPOpt/lib

Enter the password and it should work.

Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • i did so , but still have problem. mossen@mossen-desktop:/opt/openfoam211/platforms/linux64GccDPOpt$ sudo chown -R -H mossen:mossen '/opt/openfoam211/platforms/linuxGccDPOpt/lib' [sudo] password for mossen: chown: cannot access `/opt/openfoam211/platforms/linuxGccDPOpt/lib': No such file or directory – Mohsen Feb 05 '16 at 12:36
  • You use a wrong path. – Pilot6 Feb 05 '16 at 12:37
  • Note the difference between your current working dir that has linux64gccdpopt en the dir you try to chown that is just lunixgcc... (No 64) – Rik Feb 05 '16 at 12:39