SNAP Package: read-only file system. Unable to work!

Asked by Mukesh Kumar

I am a desktop user of Ubuntu 16.04 LTS. I installed a package: Brackets (HTML, CSS editor program) recently. I should be able to create folder/ files and edit files using it else I can't use this application. But it doesn't allow me to do so reasoning: Read-only file system! Doing basic search of the issue, it turned out to be some SNAP package. So my question is: shouldn't I be using snap package and look for an alternative? Thanks for support!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

How did you install that program?

In which directory are the files that you cannot modify?
Have you tried saving a file in your home directory?

Revision history for this message
Mukesh Kumar (mkbhanu) said :
#2

Thanks for your reply, Manfred! Please find the answers to your questions:

How did you install that program?
I installed Brackets from Software Center.

In which directory are the files that you cannot modify?
I checked the location of a sample index.html file which came with the software, and it is /snap/brackets/56/opt/brackets/samples/root. This is the directory where I am supposed to create a project and further files into it. Actually this is my work area and I need to do all the work at this location. I test this sample file and it opens successfully with this address in the address bar of the browser: http://127.0.0.1:39228/index.html

Have you tried saving a file in your home directory?
To answer your last question, I can save files in home directory. When I test an html file created in the home directory, it is referred by such a location: http://localhost/home/mkbhanu/test/Getting%20Started/index.html and fails loading erroring out:
"Not Found. The requested URL /home/mkbhanu/test/Getting Started/index.html was not found on this server. Apache/2.4.18 (Ubuntu) Server at localhost Port 80"

It seems, in order to open files successfully in my browser, I need to create and save them in my work area: /snap/brackets/56/opt/brackets/samples/root

Thank you for the support!

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

I am quite sure that you are not supposed to store your data in the sample directory ("Getting Started"), but elsewhere.
There might be a directory for that in /var/snap/brackets/56/ or something similar to this.

Revision history for this message
Mukesh Kumar (mkbhanu) said :
#4

In Windows and Mac, I am creating a directory parallel to "Getting Started" directory and Brackets is working perfectly fine there. The same is also demonstrated in various tutorials. In past 2 days, I have googled enough to find a solution and there doesn't seem to be any. In fact, I came to know a lot of people are already struggling with various snap packages (Read-only file system error when they are trying to use the application or update it) and their threads don't have any solution ending up in general answers to specific questions. Nobody seem to be acknowledging there may be a problem :(

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#5

You have to understand the difference between the area where the program is stored, and the area for data.
Also in non-snap packages there is a segregation between these two, but this can be circumvented with admin rights. With snap packages it is no more possible to bypass this segregation (because the program directories are set to read-only).

I can only repeat: Don't try storing your data in the program directory.

Revision history for this message
Mukesh Kumar (mkbhanu) said :
#6

Thanks Manfred Hampl, that solved my question.