[PLUG] Backup problems (urgent)

Robert Citek robert.citek at gmail.com
Mon Aug 18 16:55:00 UTC 2014


On Sun, Aug 17, 2014 at 10:39 PM, King Beowulf <kingbeowulf at gmail.com> wrote:
> On 08/17/2014 09:38 PM, John Jason Jordan wrote:
>> On Sun, 17 Aug 2014 21:02:47 -0700
>>
>> I just tried it. The following commands executed without error (both
>> drives were already mounted, and the folders in /media had already been
>> created)
>>
>> sudo mount -o remount,rw /dev/sdb2 /media/Home2
>> sudo mount -o remount,rw /dev/sdc /media/Movies
>>
>> But when I try to copy anything from /media/Home2
>> to /media/Movies/Backup_8.17.14 it fails because it cannot create
>> folders in /media/Movies/Backup_8.17.14 ("permission denied").
>>
>> i believe the problem is ownership, but if I change the ownership of the
>> files in /dev/sdb2 it will be a disaster later.
>
>
> 1.  [rant] You should be true root for this to properly work.  Not
> "sudo" nonsense. A true root user can r/w anything to/from anywhere.
> Using sudo you are still in a user shell not a root shell.  This can
> prevent you from accessing various files.  IMHO, this is the greatest
> injustice that the *buntus and others have foisted onto the Linux
> public. [/rant]

The equivalent to the above sudo command works properly for me.

$ mkdir zfoo zbar

$ dd if=/dev/zero bs=1M count=100 of=zfoo/sample.ext2.img

$ echo y | sudo mkfs.ext2 zfoo/sample.ext2.img
mke2fs 1.42.9 (4-Feb-2014)
zfoo/sample.ext2.img is not a block special device.
Proceed anyway? (y,n) Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
25688 inodes, 102400 blocks
5120 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
13 block groups
8192 blocks per group, 8192 fragments per group
1976 inodes per group
Superblock backups stored on blocks:
    8193, 24577, 40961, 57345, 73729

Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done

$ sudo mount -o rw zfoo/sample.ext2.img zbar/

$ sudo touch zbar/hello.world.txt

$ ls -la zbar/
total 17
drwxr-xr-x 3 root root  1024 Aug 18 09:50 .
drwxrwxrwt 4 root root  4096 Aug 18 09:28 ..
-rw-r--r-- 1 root root     0 Aug 18 09:50 hello.world.txt
drwx------ 2 root root 12288 Aug 18 09:45 lost+found


I suspect that whatever the issue is it lies elsewhere and not with sudo.

Regards,
- Robert



More information about the PLUG mailing list