Application cwd in SNAP_APP_PATH vs SNAP_APP_DATA_PATH

Didier Roche didrocks at ubuntu.com
Fri Mar 18 07:56:12 UTC 2016


Le 17/03/2016 23:17, Kyle Fazzari a écrit :
>
> On 03/17/2016 06:06 PM, Sergio Schvezov wrote:
>>
>> 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.
> +1 for PWD for binaries, SNAP_DATA for services.
I don't think we should have a different data access experience (PWD vs
SNAP_DATA) between services and binaries. This brings some inconsistency
and creates confusion IMHO.

However, I kind of agree now that this is implemented to rather get
SNAP_USER_DATA for commands (as the commands are running as an user) and
SNAP_DATA for services (which are running as root), unless we let them
running as an user.

Does this make sense to everyone?
Didier






More information about the snappy-devel mailing list