You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/docs/overview/start.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,11 +125,27 @@ party_dinosaur.gif
125
125
````
126
126
127
127
## Commands needing root
128
-
The next set of actions, namely anything with `--writable` or bootstrap, do require you to use sudo. If you have been working on your shared resource, you will need to move to your personal laptop (and install Singularity if you haven't yet) before trying these out.
128
+
The next set of actions, namely anything with `--writable` or bootstrap, do require you to use sudo, at least formost things. We can actually shell into a container, with `--writable`, and write to (some) locations for which we have permission to do so. Thus, this is possible to do, and will work depending on the permissions setin the container. For example, here let's shell in and try to write a root `/data` folder:
129
+
130
+
```bash
131
+
singularity shell --writable centos7.img
132
+
Singularity: Invoking an interactive shell within container...
Oups. How about a folder in the present working directory?
139
+
140
+
```
141
+
Singularity centos7.img:~/Desktop> touch file.txt
142
+
```
143
+
144
+
This we are allowed to do, so it's not totally impossible to write some files in a container without sudo. However, for most things, you will need to use sudo with writable, discussed next. At this point, if you have been working on your shared resource, you will need to move to your personal laptop (and install Singularity if you haven't yet) before trying these out.
129
145
130
146
131
147
### Writing in the container
132
-
By default, containers run in read only. While we discourage making tweaks on the fly to containers (you should properly define all edits to the container in a boostrap specification file, shown later) you can add `--writable` to any command to write inside the container. Assuming we have our `centos7.img` on our local resource with sudo, let's make a directory.
148
+
While we discourage making tweaks on the fly to containers (you should properly define all edits to the container in a boostrap specification file, shown later) you can add `--writable` to any command to write inside the container. Assuming we have our `centos7.img` on our local resource with sudo, let's try again to make that `/data`directory:
0 commit comments