Did I mess up my file permissions on Linux?

0
13
Asked By CuriousCat89 On

I tried changing the ownership of some hidden files in my local directory, like .env, using the command `sudo chown matth:matth -R ./.*`. However, now I'm getting access denied errors from several Docker containers. What did I do wrong and is there a straightforward way to undo this?

1 Answer

Answered By TechWhiz101 On

It looks like your command `./.*` changed permissions for more than just your intended hidden files. The pattern matches everything that starts with a dot, including `..`, which represents the parent directory. So, all files in the parent directory lost ownership too. To fix this, you might want to restore the ownership specifically for the affected files or directories that were supposed to stay unchanged.

FileFixer42 -

That sounds complicated! Is it possible to revert ownership to the original user for just the Docker files?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.