LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   File access during backup (https://www.linuxquestions.org/questions/slackware-14/file-access-during-backup-4175453683/)

waddles 03-11-2013 05:28 PM

File access during backup
 
I am receiving a warning that I have insufficient privs to backup a long list of files such as .kde and .mozilla when I attempt to save /root using K3b.
I am root when I receive this. I know my privs exceed 700 of .mozilla. Why am I receiving this message?

unSpawn 03-11-2013 06:06 PM

Curious. What are these files, their access rights and the access rights of the directories they're in? Also please attach or post actual K3B errors (full log better, even if seemingly unrelated lines or errors).

allend 03-11-2013 06:06 PM

Have you tried Settings -> Setup System Permissions.. in k3b?

waddles 03-11-2013 09:48 PM

@allend. I have not used that and I just checked it and it just shows:
cdrdao & cdrecord & growisofs with old permissions of 0755 and new permissions of 4711. If recall serves 4xxx is sticky.
I am not sure how this would effect the hidden files??
I am not clear on what U may be suggesting might be being learned from looking there?
@unSpawn. to list them all (at least ~50) will take forever I was unable to perform a copy with the mouse from the window they were displayed in and require at least 4X magnification to read most of them. Then I would need to perform ls -la. The 2 mentioned were fairly obvious as being in the /root directory.

allend 03-12-2013 01:02 AM

For a long time, k3b used to sit in /extra, as it required the binaries it uses to be set suid so that root permissions could be used for manipulating scheduling so that the software and hardware buffers could be maintained during writing a disk. PV has always taken a very conservative approach to allowing suid binaries in Slackware, as they could potentially be abused to compromise security.
By using the k3b option I suggested, you have given the binaries those permissions. This should now allow them to access the directories accessible only by root.

waddles 03-12-2013 12:42 PM

I have to plead that I have not made the connection of navigating to Setup System Permissions in k3b and giving suid to binaries.
Are U suggesting to give each of the files in the "details" list in the error message all suid privs? That is a huge list and not sure how to insert it into that location.

allend 03-12-2013 05:20 PM

I am suggesting that you allow k3b to configure itself so that required permissions are satisfied.

waddles 03-13-2013 03:13 PM

I have checked the appropriate boxes and provided root password at System Permissions. I still get same result. I checked cdrecord and cdrdao at /usr/bin and the privs are 755. So running k3b as root should, I think, allow access to root's hidden files but does not. Any ideas on how to reverse the checking of boxes ? Any other suggestions?

eloi 03-14-2013 08:48 AM

Quote:

Originally Posted by waddles (Post 4910974)
I have checked the appropriate boxes and provided root password at System Permissions. I still get same result. I checked cdrecord and cdrdao at /usr/bin and the privs are 755. So running k3b as root should, I think, allow access to root's hidden files but does not. Any ideas on how to reverse the checking of boxes ? Any other suggestions?

I know that it's not the answer to your
question but why don't you simple run:

Code:

# mkisofs -o backup.iso /root
and burn it with cdrecord?

Easier, faster, safer.

waddles 03-14-2013 12:14 PM

Because man mkisofs says it uses 8.3 filenaming and says it tries to form correct names by forcing the unix filename to upper case and truncating as required, but at times this yields unsatisfactory results creating cases where the truncated names are not all unique. Thanks tho I need to keep file names and apparently that does its filename conversion even with Rock Ridge.

eloi 03-14-2013 03:17 PM

Quote:

Originally Posted by waddles (Post 4911591)
Because man mkisofs says it uses 8.3 filenaming and says it tries to form correct names by forcing the unix filename to upper case and truncating as required, but at times this yields unsatisfactory results creating cases where the truncated names are not all unique. Thanks tho I need to keep file names and apparently that does its filename conversion even with Rock Ridge.

What kind of names gave you problems?
Do you mean i.e. example.txt and Example.txt?

I've made a lot of backups on Linux and FreeBSD using mkisofs and
cdrecord without problems but it's true I am conservative at
time to name my directories and files :).

One trick is to save inside the tree a .tar.gz of the whole
tree. Then you can pick individual files from the mounted CD or
untar the compressed file when you want i.e. to reinstall the
system or to reproduce the tree in other system. In that way is
easier to preserve owners and perms. Perhaps it's useful to
avoid problems with file names.

By the way, why do you need to backup the /root/.mozilla directory?

.

eloi 03-15-2013 04:38 AM

Sorry for insisting in what you didn't asked :).

I gave a try with and without the Rock Ridge (-r) option:

Code:

# mkisofs -o ~/backup.iso ~/.mozilla
# mount -o loop ~/backup.iso /mnt
# ls -F /mnt/firefox
crash_re/  ezwvbycm.def/  profiles.ini*

all files cutted to 8.3 but with:

Code:

# mkisofs -r -o backup.iso /root
# mount -o loop ~/backup.iso /mnt
# ls -F /mnt/firefox
Crash Reports/  ezwvbycm.default/  profiles.ini

# diff -r ~/.mozilla /mnt
# echo $?
0


--
Like a side note, I don't know if some Firefox developer read
this forum. Why they follow the windoze idiocy of using spaces
in directory names (i.e. "Crash Reports/").

eloi 03-15-2013 07:33 AM

Finally just to answer myself (I know I am being a bore):

Code:

# su -
# mkdir Test
# echo "Hello World" > Test/fontcase
# echo "Hello Mummy" > Test/fontCase
# echo "Once upon a time" > Test/with\ spaces
# echo "Once upon a tampax" > Test/with_spaces
# mkisofs -r -o test.iso Test
# mount -o loop test.iso /mnt
# ls -F /mnt
fontcase  fontCase  with spaces  with_spaces
# cat /mnt/*
Hello World
Hello Mummy
Once upon a time
Once upon a tampax
#

No problemo with conversions ;).

.

waddles 03-15-2013 04:32 PM

I backup /root/.mozilla because it has in it some files I modified for Firefox which I do not remember why but at the time I built them they were important and if (?) ha! I ever need them I can get back into it.

Well that is contrary to the man page! Hey I sure appreciate UR effort to resolve. It relieved me of doing it --THANKS
I have gotten misinfo regarding tarball so thanx there too.
I think I have enough info now to build a script using mkisofs, growisofs and tar to do what I want with rsync at least will try.
Gotta b/u some user files asap.

eloi 03-16-2013 05:44 AM

It was useful for me too to check that :).

About a script. I wrote this to backup my home files:

http://roquesor.com/linux-1.php

It's able to recognize if the file is > 4G and add the iso-level option.

It supports multi-session. Till now I've used it without problems.

I asked you about /root/.mozilla because for me saving
/home/user/.mozilla is enough.

Like a side note, I've changed the direction of this thread.
Giving feedback about permissions issues could be useful and
important for all (i.e. unspawn is a rootkit detector
developer).


Walter


PD: Please, try to use standard English with me.
My English is very very basic :).


All times are GMT -5. The time now is 10:57 AM.