0

I'm using an ubuntu VM machine on Azure. The goal is to allow user1 to to upload files to /folder1/folder2 through a scp command. Right now I get Permission denied.

I run the commands directly on the VM in azure. whoami results in root.

I have run

But when I run

  • ls -l /folder1/folder2 to view permissions, nothing has changed and user1 still doesn't have permission to transfer the file.

I have no idea what I'm doing wrong. The commands all seem to be successful when running them as root.

Mumfi
  • 101
  • What is the filesystem on which /folder1/folder2 resides? How is it mounted? Use findmnt -T /folder1/folder2 if you're not sure – steeldriver Dec 10 '22 at 01:20
  • @steeldriver This is what I get:

    TARGET /folder1/folder2 .... SOURCE /dev/mapper/{GUID} ... FSTYPE ext4 .... OPTIONS rw,nosuid,nodev,noexec,noatime,nodiratime... Not sure what to make of this.

    – Mumfi Dec 12 '22 at 09:40
  • @steeldriver I got it to work when adding the -R option, i.e. sudo chown -R user1 /folder1/folder2. To my understanding that means I gave user1 ownership of all subfolders. I don't see why that helped. Does it make sense to you? – Mumfi Dec 12 '22 at 09:59

0 Answers0