Application cwd in SNAP_APP_PATH vs SNAP_APP_DATA_PATH
Sergio Schvezov
sergio.schvezov at canonical.com
Thu Mar 17 22:06:02 UTC 2016
El 04/03/16 a las 13:03, Gustavo Niemeyer escribió:
>
> On Fri, Mar 4, 2016 at 1:01 PM, Didier Roche <didrocks at ubuntu.com
> <mailto:didrocks at ubuntu.com>> wrote:
>
> So, they will probably either use:
> $SNAP/<path_to_asset_or_helper>
>
>
> To be fair, that argument goes both ways. They might just as well do
> $SNAP_DATA/<path to data>.
I am very late to this thread, but it seems all apps default to SNAP_DATA?
ubuntu at localhost:~$ hello-world.env | grep '^PWD='
PWD=/var/lib/snaps/hello-world.canonical/6.0
Why not SNAP_USER_DATA? As a user I cannot do anything on SNAP_DATA
unless I sudo, if that were the case I'd prefer the current PWD to be
preserved so at least I know where I am.
So in my busybox snap I cannot do (unless I sudo):
ubuntu at localhost:~$ busybox.touch touched_file
I cannot do this either (as the envvar for obvious reasons does not exist):
ubuntu at localhost:~$ busybox.touch $SNAP_USER_DATA/touched_file
If it is the current working directory I could at least change dir to
whatever location I could write to before executing this `busybox.touch`
command.
If it were a daemon I have no quarrel with SNAP_DATA being the working
directory though.
Can we revert this behavior?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20160317/8f048a38/attachment.pgp>
More information about the snappy-devel
mailing list