Now we've added a hard disk to our system, we can start configuring OMV, but before we dive in, there's one thing we must do first: set the system time.
Unfortunately, the bPi doesn't have a battery-backed clock, so when you turn it on, it will have no idea what time it is. For now, we'll set the time in the System/Date & Time page of the web admin interface, and we'll address later the issue of how to do this automatically when the bPi boots up.
I added a taka user account earlier and this will have read-only access to the NAS, but I also want another special user account that will have write access.
So, I create a taka-w user in the same way as before, and we'll give it write access in the next section.
Creating shared folders
Go to the Access Rights Management/Shared Folders tab in the web admin interface and click on the Add button. Give the new shared folder a name, choose where you want it to live, then set the permissionsHow OMV permissions work is described in more detail here. as follows:
- Administrator = read/write
- Users = read-only
- Others = no access
This gives OMV users read-only access to the shared folder, so in order to give the taka-w user write access, click on the ACLAn "Access Control List" is a more precise set of user permissions that can be set on a file. button and configure things as follows:
- In the User/Group permissions section:
- Find the taka-w user and give it Read/Write access.
- In the Extra options sectionYou might think that because I'm just storing music in this folder, I won't need Execute permissions, which is correct for files, but in Linux, you need Execute permissions on a directory to be able to look into it. If you don't assign Execute permissions here, you won't be able to open any directories!:
- The Owner should be root, and have Read/Write/Execute access.
- The Group should be users, and have Read/Execute access.
- Others should have no access (i.e. None).
Make sure Replace all existing permissions and Apply permissions to files and subfoldersThis is not strictly necessary right now, since we just created the folder and so it's empty, but if you do this later, you will want these permissions to be applied to everything in the folder. are ticked, then click on Apply.
We now have a shared folder that can be read by the taka user (and any other user you add to OMV), and can be written to by taka-w. If we take a look at our drive, we can see OMV has created the folder at the top of our file system:
Creating convenience symlinks
It's a bit tedious having to use the really long folder name in /media/ every time you want to access your files (even with auto-completion), so, while not strictly necessary, I like to set up symlinks that give me more convenient access:
I can now access the new music shared folder via the more convenient /shares/music/.
First, enable the Samba service in the Services/SMB/CIFS section of the web admin interface.
Uploading files to the NAS
In the previous section, I gained access to the shared folder from Windows, but if I try to drag a file into it, I get a "You need permission to perform this action" error. This is because I'm logged in as takaMy Windows account is called "taka", and so by default, I will connect to Samba using the same name., which only has read access to the folder. To be able to upload files, I need to connect to Samba using the special taka-w account.
- Right-click on the folder and choose Map network drive...
- Tick Connect using different credentials.
I'm now connected to Samba via Q: drive, as the taka-w user, and can upload, change or delete files.
When you're done, close the connection by right-clicking on the folder and choosing "Disconnect", or from the console:
net use q: /d
|« Adding a new hard disk to Open Media Vault||Tutorial index||Managing permissions in Open Media Vault »|
|↵1||How OMV permissions work is described in more detail here.|
|↵2||An "Access Control List" is a more precise set of user permissions that can be set on a file.|
|↵3||You might think that because I'm just storing music in this folder, I won't need Execute permissions, which is correct for files, but in Linux, you need Execute permissions on a directory to be able to look into it. If you don't assign Execute permissions here, you won't be able to open any directories!|
|↵4||This is not strictly necessary right now, since we just created the folder and so it's empty, but if you do this later, you will want these permissions to be applied to everything in the folder.|
|↵5||This is a system service that lets Windows access files on a Linux computer.|
|↵6||My Windows account is called "taka", and so by default, I will connect to Samba using the same name.|