can't get backup to run on dual user profile pc

Asked by Peter Jordan

I am using 14.04 lts. wife and I have separate account profiles. Backup works perfectly on my account profile backing up to a separate internal hard drive exclusively for backups at( /media/me/Backup Data/folder name).
When my wife tries to backup, the system sees the hard drive and Mounts it correctly in her account profile as a separate mount point to mine(/media/wife/Backup Data/ folder name).

 It then tries to create the backup for her but keeps cming up with error messages.
"Backup Failed. Error creating directory, permission denied."
"permissions denied when trying to read/media/wife/backup Data/"
As the issue seems to be to do with permissions . I changed my wifes account profile from standard to Administrator to overcome the permissions issue but the system still reports the same problem.
to recap the drive mounts correctly for us both.
the settings are the same format with different client and folder names.
On one account backup works perfectly.
On the other account it is refused access permissiopns denied even as an administrator.
how do I sort out this permissiopns issue.

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
actionparsnip (andrew-woodhead666) said :
#1

What is the output of:

ls -la /media/wife/backup\ Data

Thanks

Revision history for this message
Peter Jordan (austinjames) said :
#2

On 05/01/2014 12:16 PM, actionparsnip wrote:
> Your question #247946 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247946
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> What is the output of:
>
> ls -la /media/wife/backup\ Data
>
> Thanks
>
The system response to ls -la /media/pat/Backup Data in my wifes profile
is as follows.

ls cannot access /media/pat/Backup: No such file or directory
ls cannot access Data: No such file or Directory

Backup Data is the volume label for the sdb hard drive and clearly is
there in my profile.
When the backup programme runs in my wifes profile it reports you do not
have the permissions necessary to view the contents of "Backup Data".
How do I change permissions to get the access required in my wifes
profile. clearly the system sees the second drive as only belonging to me.

regards
Peter

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Peter Jordan (austinjames) said :
#4

I still need help on this issue

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

You did not correctly execute actionparsnip's command, The backslash was there on purpose. Please try again when logged in with your wife's account and the hard disk mounted:

ls -la /media/wife/backup\ Data

Revision history for this message
Peter Jordan (austinjames) said :
#6

Hi Manfred,
Have keyed the command in my wifes profile exactly as requested including the backslash.
terminal returns.
"bash: ls-la/media/pat/backup Data: No such file or directory."
You will note the backslash has been removed by the bash programme when it responds to the terminal command.

the backup programme launches to initiate the backup then gives the error report.
"permission denied when trying to read /media/pat/Backup Data"

The file /directory does exist as it backs up my profile perfectly. Something connected with permissions seems to be stopping pat having access to the sdb drive. The whole drive has a volume label "Backup Data" and within that drive is a folder I created from my own profile called Pat Backups. ready to accept her files and a seperate folder for my own backups.
The sdb drive mounts correctly under seperate mount points for each profile.
hope this helps.

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

Now it seems that you omitted some space characters. Try again

ls -la /media/wife/backup\ Data

Revision history for this message
Peter Jordan (austinjames) said :
#8

On 05/31/2014 02:16 PM, Manfred Hampl wrote:
> Your question #247946 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247946
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> Now it seems that you omitted some space characters. Try again
>
> ls -la /media/wife/backup\ Data
>
The response is.
ls: cannot access /media/pat/Backup Data: no such file or directory

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

It seems that the command was now correctly executed, but apparently the environment was not correct.
Did you execute that command when logged in under your own name, or when logged in as your wife?

Please provide also the output of the commands

mount
cat /etc/mtab

Revision history for this message
Peter Jordan (austinjames) said :
#10

i executed the command when logged in as my wife. I will execute the new commands you requested as my wifeand report back shortly.

Revision history for this message
Peter Jordan (austinjames) said :
#11

On 05/31/2014 04:56 PM, Manfred Hampl wrote:
> Your question #247946 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247946
>
> Status: Open => Needs information
>
> Manfred Hampl requested more information:
> It seems that the command was now correctly executed, but apparently the environment was not correct.
> Did you execute that command when logged in under your own name, or when logged in as your wife?
>
> Please provide also the output of the commands
>
> mount
> cat /etc/mtab
>
On 05/31/2014 07:41 PM, Peter Jordan wrote:
I manualy mounted Sdb drive in my wifes profile and ran the following
commands.
> mount
> cat /etc/mtab
pat@peter-GA-880GMA-UD2H:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs
(rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup
(rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1001/gvfs type fuse.gvfsd-fuse
(rw,nosuid,nodev,user=pat)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse
(rw,nosuid,nodev,user=peter)
/dev/sdb on /media/pat/Backup Data type ext4
(rw,nosuid,nodev,uhelper=udisks2)
pat@peter-GA-880GMA-UD2H:~$ cat /etc/mtab
/dev/sda1 / ext4 rw,errors=remount-ro 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
none /sys/fs/cgroup tmpfs rw 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0
none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0
none /run/shm tmpfs rw,nosuid,nodev 0 0
none /run/user tmpfs rw,noexec,nosuid,nodev,size=104857600,mode=0755 0 0
none /sys/fs/pstore pstore rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
systemd /sys/fs/cgroup/systemd cgroup
rw,noexec,nosuid,nodev,none,name=systemd 0 0
gvfsd-fuse /run/user/1001/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,user=pat 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse
rw,nosuid,nodev,user=peter 0 0
/dev/sdb /media/pat/Backup\040Data ext4 rw,nosuid,nodev,uhelper=udisks2 0 0
pat@peter-GA-880GMA-UD2H:~$

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

Thank you for the output.
It seems to me that the entry for the backup disk in /etc/mtab is not correct (I assume it should be /dev/sdb1 and not /dev/sdb). For verification, I recommend that you reboot, log in with your own name and re-execute the commands as done under your wife's name and copy/paste the output here again.

Please add also the output of the command
sudo fdisk -l

Revision history for this message
Peter Jordan (austinjames) said :
#13

Here is the output as requested from my profile.
peter@peter-GA-880GMA-UD2H:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=peter)
/dev/sdb on /media/peter/Backup Data type ext4 (rw,nosuid,nodev,uhelper=udisks2)
peter@peter-GA-880GMA-UD2H:~$ cat /etc/mtab
/dev/sda1 / ext4 rw,errors=remount-ro 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
sysfs /sys sysfs rw,noexec,nosuid,nodev 0 0
none /sys/fs/cgroup tmpfs rw 0 0
none /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/security securityfs rw 0 0
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
tmpfs /run tmpfs rw,noexec,nosuid,size=10%,mode=0755 0 0
none /run/lock tmpfs rw,noexec,nosuid,nodev,size=5242880 0 0
none /run/shm tmpfs rw,nosuid,nodev 0 0
none /run/user tmpfs rw,noexec,nosuid,nodev,size=104857600,mode=0755 0 0
none /sys/fs/pstore pstore rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,noexec,nosuid,nodev,none,name=systemd 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,user=peter 0 0
/dev/sdb /media/peter/Backup\040Data ext4 rw,nosuid,nodev,uhelper=udisks2 0 0
peter@peter-GA-880GMA-UD2H:~$ sudo fdisk -l
[sudo] password for peter:
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000aa388

   Device Boot Start End Blocks Id System
/dev/sda1 * 2048 969439231 484718592 83 Linux
/dev/sda2 969441278 976771071 3664897 5 Extended
/dev/sda5 969441280 976771071 3664896 82 Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
peter@peter-GA-880GMA-UD2H:~$

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

ok, and now please provide the output of

ls -la /media/peter/Backup\ Data

(when logged in with your name)

Revision history for this message
Peter Jordan (austinjames) said :
#15

peter@peter-GA-880GMA-UD2H:~$ ls -la /media/peter/Backup\ Data
total 36
drwx------ 6 peter peter 4096 May 2 17:30 .
drwxr-x---+ 3 root root 4096 Jun 2 13:28 ..
drwxrwxr-x 2 peter peter 4096 May 24 15:19 backups3
drwx------ 2 root root 16384 Apr 30 01:36 lost+found
drwxrwxrwx 2 peter peter 4096 Apr 30 02:00 Pat Backups
drwx------ 4 peter peter 4096 May 2 17:28 .Trash-1000
peter@peter-GA-880GMA-UD2H:~$

it is interesting that I have to manually mount the sdb drive. it was not automatically mounted when I logged in on my profile. however the backup programme finds it when it needs it as you can see.

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

Ok, now please try rebooting, logging in as your wife and mounting the backup disk again under your wife's name, and provide the output of

ls -la /media/pat/Backup\ Data

that the two sets of output can be compared.

(The problem might be that the protection of the topmost directory of the backup disk is peter:peter drwx------, or that the 'Pat Backup' directory is owned by peter, but I think it should be cross-checked with the settings shown when using your wife's account.)

Revision history for this message
Peter Jordan (austinjames) said :
#17

pat@peter-GA-880GMA-UD2H:~$ ls -la /media/pat/Backup\ Data
ls: cannot open directory /media/pat/Backup Data: Permission denied
pat@peter-GA-880GMA-UD2H:~$

Revision history for this message
Peter Jordan (austinjames) said :
#18

It appears the problem may be one of permissions as you suggest. How do I go about correcting this problem?

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

Does your wife have sudo permission?

Can you try

sudo ls -la /media/pat/Backup\ Data

and provide the output?

Revision history for this message
Peter Jordan (austinjames) said :
#20

pat@peter-GA-880GMA-UD2H:~$ sudo ls -la /media/pat/Backup\ Data
[sudo] password for pat:
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
total 36
drwx------ 6 peter peter 4096 May 2 17:30 .
drwxr-x---+ 3 root root 4096 Jun 2 16:11 ..
drwxrwxr-x 2 peter peter 4096 May 24 15:19 backups3
drwx------ 2 root root 16384 Apr 30 01:36 lost+found
drwxrwxrwx 2 peter peter 4096 Apr 30 02:00 Pat Backups
drwx------ 4 peter peter 4096 May 2 17:28 .Trash-1000
pat@peter-GA-880GMA-UD2H:~$

Puzzled as to why the sudo command has made a difference as my wife is an administrator, so sudo should not have been required but clearly it has made a difference?

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

Even if your wife is member of the admin group, sudo is required for that action.
Ubuntu has a security concept that also admin users work with normal user privileges unless they execute a command with sudo (or gksudo, kdesudo) (see also https://help.ubuntu.com/community/RootSudo ).

I conclude that the root cause of the problem of pat being unable to access the Backup Data is the protection on the topmost directory of that Backup Data file system.

I see two possibilities for correcting that:

1. open that directory for everyone (simple, but less secure)
2. create a specific group, allow write access for that group, and add all users who are supposed to use the Backup Data disk to that group (a bit more effort, but more secure).

Revision history for this message
Peter Jordan (austinjames) said :
#22

On 06/03/2014 07:07 AM, Manfred Hampl wrote:
> Your question #247946 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247946
>
> Manfred Hampl proposed the following answer:
> Even if your wife is member of the admin group, sudo is required for that action.
> Ubuntu has a security concept that also admin users work with normal user privileges unless they execute a command with sudo (or gksudo, kdesudo) (see alsohttps://help.ubuntu.com/community/RootSudo ).
>
> I conclude that the root cause of the problem of pat being unable to
> access the Backup Data is the protection on the topmost directory of
> that Backup Data file system.
>
> I see two possibilities for correcting that:
>
> 1. open that directory for everyone (simple, but less secure)
> 2. create a specific group, allow write access for that group, and add all users who are supposed to use the Backup Data disk to that group (a bit more effort, but more secure).
>
I think option2. is the one to try. Can you advise me of the correct
commands to do this, or point me to a detailed explanation of how to do
this. I have looked at the MAN pages but I am confused by them. Am I
trying to add a group or a system group. The MAN pages refer to two
different commands.
  "adduser--group" and "groupadd" do they both achieve the same end. Not
sure how to then add the users to the group and give them write access.
Appologies for my ignorance am very new to Ubuntu Linux.

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

The terminal commands for achieving that should be (when logged in as peter):

sudo groupadd backupdata
sudo adduser peter backupdata
sudo adduser pat backupdata
sudo chgrp backupdata /media/peter/Backup\ Data
sudo chown pat:pat /media/peter/Backup\ Data/Pat\ Backups

Then log out, log in again as peter and provide the output of the following commands as verification:

whoami
groups
ls -la /media/peter/Backup\ Data

and similar when logged in as your wife verify with the commands

whoami
groups
ls -la /media/pat/Backup\ Data

Revision history for this message
Peter Jordan (austinjames) said :
#24

On 06/04/2014 01:41 PM, Manfred Hampl wrote:
> Your question #247946 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247946
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> The terminal commands for achieving that should be (when logged in as
> peter):
>
> sudo groupadd backupdata
> sudo adduser peter backupdata
> sudo adduser pat backupdata
> sudo chgrp backupdata /media/peter/Backup\ Data
> sudo chown pat:pat /media/peter/Backup\ Data/Pat\ Backups
>
> Then log out, log in again as peter and provide the output of the
> following commands as verification:
>
> whoami
> groups
> ls -la /media/peter/Backup\ Data
>
> and similar when logged in as your wife verify with the commands
>
> whoami
> groups
> ls -la /media/pat/Backup\ Data
>
On 06/04/2014 04:42 PM, Peter Jordan wrote:
> peter@peter-GA-880GMA-UD2H:~$ sudo groupadd backupdata
> [sudo] password for peter:
> no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
> groupadd: group 'backupdata' already exists
> peter@peter-GA-880GMA-UD2H:~$ sudo adduser peter backupdata
> The user `peter' is already a member of `backupdata'.
> peter@peter-GA-880GMA-UD2H:~$ sudo adduser pat backupdata
> The user `pat' is already a member of `backupdata'.
> peter@peter-GA-880GMA-UD2H:~$ sudo chgrp backupdata
> /media/peter/Backup\ Data
> peter@peter-GA-880GMA-UD2H:~$ sudo chown pat:pat /media/peter/Backup\
> Data/Pat\ Backups
> peter@peter-GA-880GMA-UD2H:~$
>
>
> peter@peter-GA-880GMA-UD2H:~$ whoami
> peter
> peter@peter-GA-880GMA-UD2H:~$ groups
> peter adm cdrom sudo dip plugdev lpadmin sambashare backupdata
> peter@peter-GA-880GMA-UD2H:~$ ls -la /media/peter/Backup\ Data
> total 36
> drwx------ 6 peter backupdata 4096 May 2 17:30 .
> drwxr-x---+ 3 root root 4096 Jun 4 16:09 ..
> drwxrwxr-x 2 peter peter 4096 May 24 15:19 backups3
> drwx------ 2 root root 16384 Apr 30 01:36 lost+found
> drwxrwxrwx 2 pat pat 4096 Apr 30 02:00 Pat Backups
> drwx------ 4 peter peter 4096 May 2 17:28 .Trash-1000

> peter@peter-GA-880GMA-UD2H:~$ pat@peter-GA-880GMA-UD2H:~$ whoami
> pat
> pat@peter-GA-880GMA-UD2H:~$ groups
> pat sudo backupdata
> pat@peter-GA-880GMA-UD2H:~$ ls -la /media/pat/Backup\ Data
> ls: cannot access /media/pat/Backup Data: No such file or directory
> pat@peter-GA-880GMA-UD2H:~$ ls -la /media/pat/Backup\ Data
> ls: cannot open directory /media/pat/Backup Data: Permission denied
> pat@peter-GA-880GMA-UD2H:~$
>

>
>
>
>

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

Ok, looks fine so far, but a few commands more are needed:

log in as peter and issue

sudo chmod g+rwx /media/peter/Backup\ Data
sudo chmod go-rwx media/peter/Backup\ Data/Pat\ Backups

log in as pat and re-try

ls -la /media/pat/Backup\ Data

Revision history for this message
Peter Jordan (austinjames) said :
#26

On 06/05/2014 07:26 AM, Manfred Hampl wrote:
> Your question #247946 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247946
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> Ok, looks fine so far, but a few commands more are needed:
>
> log in as peter and issue
>
> sudo chmod g+rwx /media/peter/Backup\ Data
> sudo chmod go-rwx media/peter/Backup\ Data/Pat\ Backups
>
> log in as pat and re-try
>
> ls -la /media/pat/Backup\ Data
>
peter@peter-GA-880GMA-UD2H:~$ sudo chmod g+rwx /media/peter/Backup\ Data
[sudo] password for peter:
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
peter@peter-GA-880GMA-UD2H:~$ sudo chmod go-rwx media/peter/Backup\
Data/Pat\ Backups
chmod: cannot access ‘media/peter/Backup Data/Pat Backups’: No such file
or directory
peter@peter-GA-880GMA-UD2H:~$

Note: The above commands were executed with sdb mounted at
/media/peter/Backup. Each time I switch to pat, I am manually changing
the sdb mount point to /media/pat/Backup. Is this still correct now we
have created the group or should the sdb mount point now remain always
with peter or pat or have its own group mount point.

Revision history for this message
Peter Jordan (austinjames) said :
#27

On 06/05/2014 12:16 PM, Peter Jordan wrote:
> On 06/05/2014 07:26 AM, Manfred Hampl wrote:
>> Your question #247946 on Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+question/247946
>>
>> Status: Open => Answered
>>
>> Manfred Hampl proposed the following answer:
>> Ok, looks fine so far, but a few commands more are needed:
>>
>> log in as peter and issue
>>
>> sudo chmod g+rwx /media/peter/Backup\ Data
>> sudo chmod go-rwx media/peter/Backup\ Data/Pat\ Backups
>>
>> log in as pat and re-try
>>
>> ls -la /media/pat/Backup\ Data
>>
> peter@peter-GA-880GMA-UD2H:~$ sudo chmod g+rwx /media/peter/Backup\ Data
> [sudo] password for peter:
> no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
> peter@peter-GA-880GMA-UD2H:~$ sudo chmod go-rwx media/peter/Backup\
> Data/Pat\ Backups
> chmod: cannot access ‘media/peter/Backup Data/Pat Backups’: No such
> file or directory
> peter@peter-GA-880GMA-UD2H:~$
>
> Note: The above commands were executed with sdb mounted at
> /media/peter/Backup. Each time I switch to pat, I am manually changing
> the sdb mount point to /media/pat/Backup. Is this still correct now
> we have created the group "backupdata" or should the sdb mount point
> now remain always with peter or pat or have its own group mount point.
>
> pat@peter-GA-880GMA-UD2H:~$ ls -la /media/pat/Backup\ Data
> total 36
> drwxrwx--- 6 peter backupdata 4096 May 2 17:30 .
> drwxr-x---+ 3 root root 4096 Jun 5 12:20 ..
> drwxrwxr-x 2 peter peter 4096 May 24 15:19 backups3
> drwx------ 2 root root 16384 Apr 30 01:36 lost+found
> drwxrwxrwx 2 pat pat 4096 Apr 30 02:00 Pat Backups
> drwx------ 4 peter peter 4096 May 2 17:28 .Trash-1000
> pat@peter-GA-880GMA-UD2H:~$

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

In my opinion it does not make much difference where the "Backup Data" disk is mounted. As long as it is working well I do not see the need for a change. But the next step is to check whether it is really working now.

I assume from the last output, that when your wife is logging in, she still can mount the disk as before.
Can she now run the backup program as expected?

And just for cross-checking - can you with your user perform your backups as before?

And the last thing that I see: The access control settings on the backup directories currently are a bit wider than necessary. It would be possible to remove the public access rights on these directories.

Revision history for this message
Peter Jordan (austinjames) said :
#29

On 06/05/2014 01:21 PM, Manfred Hampl wrote:
> Your question #247946 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247946
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> In my opinion it does not make much difference where the "Backup Data"
> disk is mounted. As long as it is working well I do not see the need for
> a change. But the next step is to check whether it is really working
> now.
>
> I assume from the last output, that when your wife is logging in, she still can mount the disk as before.
> Can she now run the backup program as expected?
>
> And just for cross-checking - can you with your user perform your
> backups as before?
>
> And the last thing that I see: The access control settings on the backup
> directories currently are a bit wider than necessary. It would be
> possible to remove the public access rights on these directories.
>
Manfred I think you have cracked it. :-)
Pat backup ran perfectly. Pete backup took three attempts. Originaly it
was reporting, "could not restore /home/peter/cache/deja-dup/metadata:
File not found in backup".
I then reset the backup location and folder in deja-dup, it then worked
fine and created a new backup. I can see the two sets of backup data in
the correct respective folders for Pat and Peter.

The acid test will be when the next automatic backup is scheduled to
run. Because as mentioned earlier sdb(Backup Data) is usually mounted
under media/peter. When pats backup is automatically due to run in
deja-dup the programme won't be able to see the the sdb Backup Data
drive to instigate run until I re mount the sdb drive at /media/pat.
However that is a minor issue I can happily live with.

What do you suggest in respect of the access controls?

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

pat@peter-GA-880GMA-UD2H:~$ ls -la /media/pat/Backup\ Data
total 36
drwxrwx--- 6 peter backupdata 4096 May 2 17:30 .
drwxr-x---+ 3 root root 4096 Jun 5 12:20 ..
drwxrwxr-x 2 peter peter 4096 May 24 15:19 backups3
drwx------ 2 root root 16384 Apr 30 01:36 lost+found
drwxrwxrwx 2 pat pat 4096 Apr 30 02:00 Pat Backups
drwx------ 4 peter peter 4096 May 2 17:28 .Trash-1000

The directories "backup3" and "Pat Backups" both are set to allow public access. Even if that access should be blocked by the restrictions on the directory directly above, in my opinion it would be better to remove the access rights for "others", maybe also for "group".

For peter:
chmod go-rwx /media/peter/Backup\ Data/backup3

For pat:
chmod go-rwx /media/pat/Backup\ Data/Pat\ Backups

(I had given such command already once above, but with a typo error inside, so that did not work yet - sorry).

Revision history for this message
Peter Jordan (austinjames) said :
#31

On 06/05/2014 03:16 PM, Manfred Hampl wrote:
> Your question #247946 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/247946
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> pat@peter-GA-880GMA-UD2H:~$ ls -la /media/pat/Backup\ Data
> total 36
> drwxrwx--- 6 peter backupdata 4096 May 2 17:30 .
> drwxr-x---+ 3 root root 4096 Jun 5 12:20 ..
> drwxrwxr-x 2 peter peter 4096 May 24 15:19 backups3
> drwx------ 2 root root 16384 Apr 30 01:36 lost+found
> drwxrwxrwx 2 pat pat 4096 Apr 30 02:00 Pat Backups
> drwx------ 4 peter peter 4096 May 2 17:28 .Trash-1000
>
> The directories "backup3" and "Pat Backups" both are set to allow public
> access. Even if that access should be blocked by the restrictions on the
> directory directly above, in my opinion it would be better to remove the
> access rights for "others", maybe also for "group".
>
> For peter:
> chmod go-rwx /media/peter/Backup\ Data/backup3
>
> For pat:
> chmod go-rwx /media/pat/Backup\ Data/Pat\ Backups
>
> (I had given such command already once above, but with a typo error
> inside, so that did not work yet - sorry).
>
pat@peter-GA-880GMA-UD2H:~$ whoami
pat
pat@peter-GA-880GMA-UD2H:~$ groups
pat sudo backupdata
pat@peter-GA-880GMA-UD2H:~$ ls -la /media/pat/Backup\ Data
total 44
drwxrwx--- 6 peter backupdata 4096 May 2 17:30 .
drwxr-x---+ 3 root root 4096 Jun 5 17:52 ..
drwx------ 2 peter peter 12288 Jun 5 14:18 backups3
drwx------ 2 root root 16384 Apr 30 01:36 lost+found
drwx------ 2 pat pat 4096 Jun 5 14:04 Pat Backups
drwx------ 4 peter peter 4096 May 2 17:28 .Trash-1000
pat@peter-GA-880GMA-UD2H:~$

peter@peter-GA-880GMA-UD2H:~$ whoami
peter
peter@peter-GA-880GMA-UD2H:~$ groups
peter adm cdrom sudo dip plugdev lpadmin sambashare backupdata
peter@peter-GA-880GMA-UD2H:~$ ls -la /media/peter/Backup\ Data
total 44
drwxrwx--- 6 peter backupdata 4096 May 2 17:30 .
drwxr-x---+ 3 root root 4096 Jun 5 18:10 ..
drwx------ 2 peter peter 12288 Jun 5 14:18 backups3
drwx------ 2 root root 16384 Apr 30 01:36 lost+found
drwx------ 2 pat pat 4096 Jun 5 14:04 Pat Backups
drwx------ 4 peter peter 4096 May 2 17:28 .Trash-1000
peter@peter-GA-880GMA-UD2H:~$

Manfred I think the above looks correct for pat and peter. I would
appreciate your confirmation.

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

I agree with your interpretation of the last output, The protection settings of the directories on the Backup Data disk look correct to me. If the backup program works well for both you and your wife, the problem seems to be solved.

Revision history for this message
Peter Jordan (austinjames) said :
#33

Many thanks for all your help Manfred you have taught me a lot and solved the problem.