chown: cannot access `...' : No such file or directory
47,254
Solution 1
Just run:
sudo chown -R mossen:mossen /opt/openfoam211/platforms/linux64GccDPOpt/lib
Enter the password and it should work.
Solution 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.
Related videos on Youtube
Author by
Mohsen
Updated on September 18, 2022Comments
-
Mohsen almost 2 years
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
-
Pilot6 over 8 yearsRun it with
sudo
. -
Pilot6 over 8 yearsAnd what happened? Did you enter the password?
-
Mohsen over 8 yearsyess , here it is: 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
-
Pilot6 over 8 yearsYou miss
64
. ;-)
-
-
Mohsen over 8 yearsi 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
-
Pilot6 over 8 yearsYou use a wrong path.
-
Rik over 8 yearsNote the difference between your current working dir that has linux64gccdpopt en the dir you try to chown that is just lunixgcc... (No 64)
-
coralvanda over 7 yearsI was having the same error, and this was what worked for me. Thanks!