LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-14-2011, 05:02 PM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Rep: Reputation: 60
CPIO and Find Operation not permitted errors


Below is the oneliner that I am using to exclude all of "." hidden directories within the same directory.

Code:
cd ~
find . -depth \( -wholename \./\.\* \) -prune -o -print | cpio -oav > /media/caca/extract/full$date.cpio
it works fine but when I extract the files from the full$date.cpio archive it appears to have worked but gives me permission errors:

Code:
cd /media/caca/extract
cpio -ivd < full061411.cpio
cpio: Selection_001.png: Cannot change mode to rw-r--r--: Operation not permitted
Selection_001.png
cpio: Selection_002.png: Cannot change mode to rw-r--r--: Operation not permitted
Selection_002.png
cpio: Selection_003.png: Cannot change mode to rw-r--r--: Operation not permitted
Selection_003.png
cpio: npatgpc.dl_: Cannot change mode to rw-r--r--: Operation not permitted
npatgpc.dl_
cpio: bash_history: Cannot change mode to rw-r--r--: Operation not permitted
bash_history
cpio: history_backup: Cannot change mode to rw-r--r--: Operation not permitted
history_backup
.
cpio: Ubuntu One: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Pictures: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Documents/scripts: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Documents: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Downloads/aflack/Oracle Lockout Issue Files: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Downloads/aflack: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Downloads/giobbi: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Downloads/fitzpatrick: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Downloads: Cannot change mode to rwxrwxrwx: Operation not permitted
cpio: Desktop: Cannot change mode to rwxrwxrwx: Operation not permitted
325167 blocks
It there a way to preserve the permission so that it does error like this?
 
Old 06-14-2011, 06:04 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
What mount options is /media/caca mounted with, what file system is it on and are you copying out and in as the same user?
 
Old 06-15-2011, 09:48 AM   #3
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Thanks for the response:

What mount options is /media/caca mounted with?

Code:
//testbox/users/precious on /media/caca type cifs (rw,mand)
and here is my entry in fstab:

Code:
//testbox/users/precious /media/caca cifs credentials=/home/daman/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
with, what file system is it on?

Windows 2008 R2 using NTFS

Are you copying out and in as the same user?

YES, In my .smbcredential file I have to use my account name and password to access the share. This share is my home directory. This is an Ubuntu 10.04 box that I am mounting from to a Windows 2008 R2 domain controller

Also one more question:

What is the correct commandline substituion to add this as a variable using the Korn Shell?

Code:
full_backup_dir=$(find . -depth \( -wholename \./\.\* \) -prune -o -print | cpio -oav > /media/caca/extract/full$date.cpio)
and

Code:
$(find $home_dirs -mtime -1 | cpio -oa 2>/dev/null | ( cd $backup_dir && cpio -imd)
neither seem to work. ?

Last edited by metallica1973; 06-15-2011 at 11:55 AM.
 
Old 06-15-2011, 02:24 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
The only thing I can think of is something like CIFS UNIX extensions. I haven't got a box to test it with let alone W2K8 R2 tho, maybe somebody else has?..
 
Old 06-16-2011, 03:58 PM   #5
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
The good news is that I am only testing it using my home directory for testing but when I perfect my script I will be running it from linux and backing up to a mounted ext3 external backup NAS. I am still curious what it maybe. Thanks for the response
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Operation not permitted prasunhowlader Linux - Newbie 3 08-20-2008 09:29 PM
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 09:27 PM
operation not permitted jamaso Slackware 2 05-08-2004 05:55 AM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration