Search code examples
unixfile-permissions

Unix file permissions, WARNING: can't access


I'm trying to change the permissions of a few files that are used with a webpage I'm uploading to my site. I'm using the Unix command line to do it.

I've tried two commands:

chmod 755 index.html
chmod 644 index.html

But I get the message

chmod: WARNING: can't access index.html

after using these commands for some reason, and I have no idea why... initially I though it might be because I had the file open in a couple of programs (text editor and web browser), but I've closed these down, and I'm still getting the same problem... any idea why, and how I can set the permissions correctly so that the file will be viewable by anyone on the web, but only editable by me?

Cheers!


Solution

  • Here's a link that looks similar to your problem but it's on Solaris:

    http://www.unix.com/solaris/45229-unable-chmod-file-directory.html

    The solution is on pg 2 of this thread but the Cliff's note version of the solution is the person found that something else was mounting at that directory. It showed up when they ran

    df -k /their_dir_location
    

    Hope this helps.