New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with the snap installed version #3143
Comments
/cc @anthonyfok |
@bep, thank you for the /cc! Hi @aquilax, What you are seeing, as inconvenient it may be, is Snaps' default and expected behaviour for security reasons. To quote https://snapcraft.io/: Snaps are read-only and have segregated data storesSnaps are read-only for security. We want to prevent a hostile party from sneakily changing the software on your machine, so you cannot modify a snap that is installed on your system. This also means you can always check the signature on the snap, even long after you installed it, to make sure it is still exactly the software you intended. If you want to modify a snap, you can usually build your own version of it, especially if it is open source. So where can a snap write data? Each snap gets its own set of writable directories which have specific properties. There are two directories which the snap can write to independent of the user. One of these is versioned - each time the snap is upgraded the data is saved and the new snap revision can upgrade its copy. The other ‘common’ data directory is not versioned and is used for big blobs of data that you don’t want to duplicate across revisions of the snap:
Typically, configuration is stored in one of these, along with system-wide data for the snap. There are also an equivalent two writable directories for each snap in the user home, which can be used to store snap data that is specific to one user or another, separately:
This way applications can be immutable for security reasons while still offering a full and rich user experience. To learn more about the makeup of a snap please see the snap architecture article. So, for most snaps, non-root users may only write inside two specific directories, and for Hugo, I would have had to limited myself to Thankfully, in the snapcraft.yaml "recipe" kindly provided by our friends like @dholbach from Canonical, this restriction was relaxed with the use of the What it means is that you can use the snap edition of Hugo to write (i.e. run Should we relax this restriction even further? I suppose we could (I don't know how yet), but since that would go against Snaps' security model and design philosophy, so I have my reservations too. So, perhaps the "write inside $HOME only" needs to be documented, perhaps in docs/content/overview/installing.md right after the |
Thank you for the detailed response, @anthonyfok. I ended building Documenting this limitation in the documentation would be definite improvement. |
@anthonyfok I'd like your input on whether this is something that should be added to upcoming documentation for Linux installation (not in its entirety, but maybe as a callout/admonition => just 1 or 2 sentences). In other words, is this a common "gotcha" for Linux users? |
Hi @rdwatters, Thank you for asking! Yes, this is something that needed to be added to the Hugo documentation, maybe for both installation instruction and for the As in whether it is a common "gotcha"? Yes, it is for all Linux users who decided to install Hugo as a "snap", but such restriction does not exist for .deb, .rpm or .tar.gz packages/archives. My personal favourite is actually That said, while Snaps are universal and do work on Fedora and other non-Debian/non-Ubuntu Linux distributions, I would wildly guess that 90% of Hugo Snap users are Ubuntu users. Mind you, Ubuntu is the most popular Linux distribution, so I foresee more and more users running into this "write in (The Fedora/Red Hat/GNOME world has their own Flatpak which is somewhat similar to Snaps, though I haven't used Flatpak and thus cannot comment on its similar "write in |
@anthonyfok I appreciate the patience and feedback. |
Oh, and @aquilax, your input is welcome too. Thanks guys. |
@rdwatters Looks much better than before. |
Hi @rdwatters! Thank you for updating the documentation! It looks really nice, though the so-called " I just discovered something new though: It turns out there is a new
To quote:
So, it is possible, but users would then have to type Anyhow, back to the actual documentation text. :-) I recommend making the following revisions:
Also, I notice the absence of installing Hugo as a traditional
Yes, I recommend placing the secions on Arch and Debian/Ubuntu together, and placing the Snap section right underneath. ;-) By the way, English is not my first language, so please feel free to revise whatever I have written. Many thanks @rdwatters! |
@anthonyfok I've updated per all your recommendations. I appreciate your always thoughtful and well-articulated feedback. I've certainly learned a lot in this process. Also...
A. I never would have guessed. Your English is fantastic! Thank you @aquilax as well. Cheers. |
Thank you @rdwatters!
Wow, that was quick! Thank you for fixing the docs so quickly!
Actually, what I meant to say is to place the Arch section and Debian/Ubuntu section one after the other. My bad for a poor choice of word "together". I am also hoping someone will step up with the RPM maintenance for the Fedora / Red Hat / openSUSE ecosystems too so we can add that in the near future. (Looks like someone has! https://discuss.gohugo.io/t/solved-fedora-copr-repository-out-of-service/2491/12) That said, if you personally prefer keeping these distros all under one section, that is fine with me too. :-) One more nitpicking:
Please add a missing space between "
Many thanks! |
I suspected that might be the case. Nevertheless, fixed.
Ah, keen eye. Thanks! |
When will the |
I cant use the
Instalation logs:
The only way to force "classic" it are by using
I hope the docs would mention it too :/ |
Sadly, the security model of Snap makes it pretty useless. A snap-installed Hugo can't access the regular installation of |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Trying to use
hugo
installed through snap on Ubuntu 16.04.1 LTS, I get the following error:When I provide the full path, I get
Congratulations
but the directory remains empty:The text was updated successfully, but these errors were encountered: