LuckyBackup permissions denied

openSUSE 12.3
KDE 4.10.5r1
LB 0.4.7

I think I know what caused it but not how to fix it.

I have another thread about trying to copy a 4gb file to a FAT 32 partition. Not permitted so I reformatted and changed the partition to ext4.

Now when I try and run LuckyBackup and he tries to mkdir, I get the permission denied error.
I think the owner of the USB-HDD is Root and I need to change it.
So far I have not had any luck. Maybe I used the wrong partition manager program, Gparted.
I cant see how to do it within Dolphin.

Any suggestions ?

Hi
Create a sub directory and change ownership to user and group, open a terminal and eg;


su -
cd /var/run/.....
mkdir LuckyBackup
chown youruser:users LuckyBackup
exit

Create a directory, as ‘root’, within the volume and then change the
ownership to your user. For example:

Code:

mkdir /path/to/your/drive/mountpoint/newdirectory
chown hextejas /path/to/your/drive/mountpoint/newdirectory

Now see if you can copy files to
/path/to/your/drive/mountpoint/newdirectory using LuckyBackup, or anything
else in your desktop environment.

Good luck.

Well, I don’t think that will work as desired. I am trying to back up to an external HDD mounted on a USB hub.

Normally the mount point is here
/var/run/media/%user%/-----some enormously long number-----------------------

which points to the USB-HDD.

Your LuckyBackup, and I might steal the name, is its own folder and not a link.

What I also saw in Yast when I was looking at his partition tool was that I had the ability to name the device as I wanted.
Kewl says I, I can get rid of the gigantic ID and use something more meaningful, like USB-HDD.

Then it occurred to me that if I were ever to turn the device off, or had a power failure, my unique ID of USB-HDD would be forgotten.

Is that the case ?

Quite a learning experience.

Hi
The number will always be the same since it’s the uid of the disk device, it won’t be lost…

So label the disk then…? e2label /dev/sdX blah

Hi
In fact making the ext4 file system you can add the name;


fdisk /dev/sdc

Welcome to fdisk (util-linux 2.21.2).


Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.




Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 
Using default value 1
First sector (2048-8015501, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-8015501, default 8015501): 
Using default value 8015501
Partition 1 of type Linux and of size 3.8 GiB is set


Command (m for help): w
The partition table has been altered!


Calling ioctl() to re-read partition table.
Syncing disks.

mkfs.ext4 -L BLAH /dev/sdc1

mke2fs 1.42.6 (21-Sep-2012)
Filesystem label=BLAH
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
250480 inodes, 1001681 blocks
50084 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1027604480
31 block groups
32768 blocks per group, 32768 fragments per group
8080 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736


Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 


lsblk /dev/sdc

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sdc      8:32   1   3.8G  0 disk 
└─sdc1   8:33   1   3.8G  0 part /run/media/<username>/BLAH

Thank you ab, that fixed it for my home directory.

Then again, it was recommended that I also backup /etc. That one is giving me trouble with permissions again though it is on the “reading” side “opendir”.
I have no clue what is in there that is of value to me. What say you ?

Oh yeah, luck doesn’t have anything to do with it when there is a support group like I see here.

rsync: opendir "/etc/uucp" failed: Permission denied (13)


Hi
Anything out of your user home directory needs to be performed as root user… so you do two backups, one as your user. Or all as root user but you need to ensure ownership of the user remains…

On 2013-08-29 21:26, malcolmlewis wrote:
>
> Hi
> In fact making the ext4 file system you can add the name;
>
> Code:
> --------------------

> mkfs.ext4 -L BLAH /dev/sdc1
>
> mke2fs 1.42.6 (21-Sep-2012)

> lsblk /dev/sdc
>
> NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
> sdc 8:32 1 3.8G 0 disk
> └─sdc1 8:33 1 3.8G 0 part /run/media/<username>/BLAH
>
> --------------------

If you are preparing external flash media, it makes sense to use ext4
without journal:


mke2fs -t ext4 -L A_NAME -O ^has_journal /dev/sdc1


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

On 2013-08-29 21:26, hextejas wrote:
> Then again, it was recommended that I also backup /etc. That one is
> giving me trouble with permissions again though it is on the “reading”
> side “opendir”.
> I have no clue what is in there that is of value to me. What say you ?

Well, that dir is owned by root, you can not do the backup running as user.

Typically, we do two sets of backups: one for the system, one for the
users (home). And the methods need not be the same: for example, I use
images for system, rsync for home.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

I wondered if I could just login as root and do them both.
Would I have problems if I tried to recover them since root made them ?

hmmm, something to test, though I think I saw something about retaining permissions.

Well, according to your experience level I doubt you have changed anything in /etc/uucp/ that needs to be backed up.
That directory is even empty on my system anyway… :wink:

So IMHO opinion you should just exclude that directory from the backup.
You could add your user to the “uucp” group, you would have access to that directory as well then. But I doubt that is necessary in your case…

Or do you have problems with other directories as well? (this can only be decided on a case-by-case basis)

On 2013-08-29 22:46, hextejas wrote:
>
> I wondered if I could just login as root and do them both.
> Would I have problems if I tried to recover them since root made them ?

It might be better that you practice with the home backup, and then you
might try the other one. But not via login as root in a graphical
session, but, for example, starting a terminal in the session and doing
there “su -” before calling the backup program.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)