0

On x86_64 machine running FreeBSD 10.1 when I'm un-taring an file and getting below error for all files in tar :

x var/lib/nfs/statd/sm.bak/: Can't set user=1002/group=1002 for var/lib/nfs/statd/sm.bak x var/lib/nfs/rmtab: Can't set user=1002/group=1002 for var/lib/nfs/rmtab x var/lib/nfs/v4recovery/: Can't set user=1002/group=1002 for var/lib/nfs/v4recovery x var/lib/logrotate.status: Can't set user=1002/group=1002 for var/lib/logrotate.status x var/lib/arpd/: Can't set user=1002/group=1002 for var/lib/arpd x var/lib/postfix/: Can't set user=1002/group=1002 for var/lib/postfix x var/lib/systemd/: Can't set user=1002/group=1002 for var/lib/systemd tar: Error exit delayed from previous errors. 

Above error is observed only when I untar the file in mfdosfs partition. I am using below command to format the partition and mount msdosfs.

newfs_msdos -F 32 -S 4096 -c 1 -m 0xf8 /dev/da0p7 mount -t msdosfs -o large /dev/da0p7 /data/raw 

I also tried mounting as:

mount -t msdosfs -o large,uid=1002,gid=2002 /dev/da0p7 /data/raw 

But I got same result. Tar ball is Linux distribution I want this machine to duel boot from so looking for clean unr-taring. Can someone suggest fix for above problem?

EDIT 13/04/17: It seems I'M observing above behavior due to difference in file systems. Not only I'm getting above error but also not able to maintain symbolic link because of which not able to boot Linux from FAT32 partition. Wondering it there is any working fix to whole problem.

2 Answers 2

0

msdosfs/NTFS/FAT filesystems do not support linux/unix ownership and permission attributes.

You need to either format the partition with a supported file system or create an image file with a supported file system to hold the files.

2
  • Thanks for prompt response. Can you elaborate second idea bit more. What I can do with the tar? Commented Apr 11, 2017 at 9:22
  • @SatpalParmar He's trying to tell you the Filesystem you are using doesn't support octal permissions, as Windows Shares are not POSIX compliant. See my answer Commented Apr 13, 2017 at 3:55
0

Untar your file to your home directory like so:

tar -C /home/satpul -xzvf filename.txz 

assuming that your username is satpul, and zip was the compression option. Then do the following:

mv -vRf /home/satpul/extracted_files_dir/* /some/new/directory/on/samba/share 
3
  • Thanks for your response. If I understand correctly you are suggesting to untar the file in UFS partition of machine and do a move of it? If yes, I doubt this will work. I even tried rsycn but failed. FAT file also do not support symbolic link and that are also creating issues while booting. Yet to find working fix. Commented Apr 13, 2017 at 4:58
  • @SatpalParmar Yes that's what I am suggesting, untar the file then move all the files to the desired location. If you still have problems you need to perform the action as root, the change the ownership after the files are untarred and moved. Commented Apr 13, 2017 at 5:38
  • @SatpalParmar, also it should be noted that /var is owned by root, as the /var directory is used for logging and other functions, therefore I'd advise against extracting anything to /var Commented Apr 13, 2017 at 5:42

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.