0

I am trying to set up a directory to use with a docker container. I've created a new user 'me' with 'pi' permissions. In /home/me/ I created subfolders location and location/db. Everything in /home/me/ is owned by me:me. I scp'd a Sqlite database to my home directory. The copied file is owned by me:me. I can access the file with Sqlite3. When I attempt cp database.sqlite location/db I get the permission denied error. If I try to scp directly to the subdirectory the transfer fails.

I saw the (Rule #1) answer to use sudo, but then the owner is root:root. I sudo chown me:me database.sqlite to get that right and chmod 666 database.sqlite, but when I ls db/ from superdirectory 'location', I get 'ls: /db/database.sqlite: Permission denied'. Sqlite3 now tells me 'Error: unable to open database "/db/database.sqlite": unable to open database file'. The container is not running yet.

Do I really need to be root to move files I own to subdirectories I own?

zarac
  • 1

0 Answers0