0

I have two users on the machine. User1 is used for everything. User2 is used by the surveillance cameras that access the machine as an FTP Server.

I have two disk installed, Disk1=275GB, Disk2=2TB. My surveillance cameras can only record in the user home directory. That's why I'm trying to mount Disk2 on User2 home folder so the surveillance cameras can access it.

Thank you.

  • Is it a limitation of the software or permissions? There's not much to do about the former but the latter has easy solutions. – user692175 Aug 11 '17 at 22:19
  • @MichaelBay The problem is in the cameras software. The permissions was working fine. – Ramez Dous Aug 11 '17 at 22:20
  • So you're saying the user running the software can read/write/execute in the drive but the software itself cannot be set to output to a different location? What software is that exactly? Perhaps you're missing something... – user692175 Aug 11 '17 at 22:22
  • @MichaelBay It's an ip camera. It can't record anywhere else than the home directory. This was confirmed with the manufacture. So I'm searching for someway to mount my Disk2 inside the user home directory and use it for recording. – Ramez Dous Aug 11 '17 at 22:25
  • You can try symlinks: askubuntu.com/questions/56339/… but what it is doesn't matter and what the manufacturer says isn't that relevant either, what software it is working with is what matters. If your camera depends on a proprietary software it isn't a true IP camera. An IP camera is a standalone network device that can be accessed in multiple ways with dozens of different softwares. A well known CCTV software for Linux, Zoneminder, can save anywhere it has permissions to. – user692175 Aug 11 '17 at 22:37
2

Assuming the user2 is in the sudoers group, you can just do

sudo mount /dev/sdbX /home/user2

(X here stands for the number of the partition on which you want to do writes on)

if user2 i snot in the sudoers group, you can add that user manually

sudo adduser user2 sudoers

and then run the above command.

Ofcourse all this is under the assumption that you do have access to a terminal and can login to user2's account

  • Thank you. It worked but I had to restart after executing " sudo adduser user2 sudoers". The problem is that the mounting is not permanent. How to make this permanent? – Ramez Dous Aug 12 '17 at 2:55
  • to make it permanent you have to add an entry to /etc/fstab . for ubuntu and its derivatives, you may also use the disks program by searching it in Unity and editing the partition`s mount options. – davejoem Aug 12 '17 at 8:32
  • I tried to change the mount point using the "Disks" tools but I keep getting this error. "Error mounting system-managed device /dev/sda1: Command-Line 'mount "/home/user1/Desktop/2TB" existed with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program or other error. In some cases useful info is found in syslog - try dmseg | tail or so. (udisks-error-quark, 0) – Ramez Dous Aug 16 '17 at 3:06
  • What is the output of running blkid – davejoem Sep 7 '17 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.