aws-foundry-ssl icon indicating copy to clipboard operation
aws-foundry-ssl copied to clipboard

Transferring files: Cannot get real path for '/foundrydata/Data'.

Open niuserre opened this issue 2 years ago • 7 comments

I setup WinSCP following the instructions (including opening Port 22) and got to:

Enter /foundrydata/Data/ to access the location where the data files are kept.

This gives the error:

Cannot get real path for '/foundrydata/Data'.
Permission denied.
Error code: 3
Error message from server: Permission denied

If I navigate up to root, I can see /foundrydata in the folder list, but clicking on it gives Server returned empty listing for directory '/foundrydata'.

I can see that the owner for this folder is foundry, whereas the owner for all other folders is root. So I'm guessing it's something in the permissions? Thanks!

niuserre avatar Dec 31 '22 14:12 niuserre

I don't know if this was the right thing to do (if it was maybe it can go on the wiki :D), but I solved it by:

  • changing to SCP file protocol
  • setting Shell sudo su - in Advanced > Environment > SCP/Shell
  • change owner to foundry on uploaded stuff - this is the bit that makes me assume there's a better way

I couldn't get SFTP to work with any combination but SCP is fine for me, just not sure I should be messing around in sudo su.

niuserre avatar Jan 05 '23 17:01 niuserre

The foundrydata folder seems to have an ownership of foundry, which ec2-user doesn't seem to have permission to work with.

mikehdt avatar Feb 04 '23 09:02 mikehdt

same issue as @niuserre

chrisjbrown avatar Feb 05 '23 23:02 chrisjbrown

Another option, is to ignore the foundrydata/Data folder and use the linked s3 bucket you would have set up. Foundry can work with both.

mikehdt avatar Feb 06 '23 03:02 mikehdt

Another option, is to ignore the foundrydata/Data folder and use the linked s3 bucket you would have set up. Foundry can work with both.

seems like a reasonable workaround. one issue some might have is wanting to go from offline to hosted without having to update all of their image paths etc. using the foundrydata/Data directory would allow them to do that where as with s3 I think they would need to relink those

chrisjbrown avatar Feb 06 '23 18:02 chrisjbrown

I suspect if you SSH into the EC2 instance (as per the docs), then sudo su -, you can temporarily chown that folder, upload your stuff, and then chown it back.

I'm not sure how particular it is about permissions. You might be able to chmod -R +rw the foundrydata folder, so that everyone has read/write (I wouldn't recommend execute, unless you're comfortable with that). I think that should work?

mikehdt avatar Feb 07 '23 00:02 mikehdt

I'm not sure how particular it is about permissions. You might be able to chmod -R +rw the foundrydata folder, so that everyone has read/write (I wouldn't recommend execute, unless you're comfortable with that). I think that should work?

yeah that seems to work.

chrisjbrown avatar Feb 08 '23 14:02 chrisjbrown