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.

| improve this question | | | | |

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.

| improve this answer | | | | |
  • Thanks for prompt response. Can you elaborate second idea bit more. What I can do with the tar? – Satpal Parmar Apr 11 '17 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 – eyoung100 Apr 13 '17 at 3:55

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
| improve this answer | | | | |
  • 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. – Satpal Parmar Apr 13 '17 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. – eyoung100 Apr 13 '17 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 – eyoung100 Apr 13 '17 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.