• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can't access tape drive from Solaris 8 - permissions?

RalphTheCow

Golden Member
We have a script that can write ok with tar cvf to a remote tape drive /dev/rmt/0cb, but I can't write from any other script or the command line with tar cvf. It says "Permission denied".

BTW, how long has this forum been here? I only see threads from today - I'm so confused! It seems like I should have posted this in Operating Systems since it looks like there is so much more traffic there.
 
Originally posted by: RalphTheCow
We have a script that can write ok with tar cvf to a remote tape drive /dev/rmt/0cb, but I can't write from any other script or the command line with tar cvf. It says "Permission denied".

BTW, how long has this forum been here? I only see threads from today - I'm so confused! It seems like I should have posted this in Operating Systems since it looks like there is so much more traffic there.

this forum was split from OS a few months ago when the forums were reorganized

cant help with the solaris problem 😛
 
What does /var/adm/messages say? Is the drive mounted? How do you run the current script (as a user or as root?) can you paste the script here?
 
The problem turned out to be worn out tapes. Bu I'm still confused about this forum. I only see less than a page of posts, so we'll see what happens when I bump this one that I only got to from the MyForums link.
 
Check your profile settings.
One of the available settings is the cut-off age to display a post. I think the default is a couple days.
 
Hey, here I am back a year and a half later. I thought the problem was old tapes, but I just tried a brand new tape with the same results. A small tarball works with no problems, but when I make a huge one, I can't extract files individually. And on the small tarball, it only works with no pathnames, for instance tar xvf /dev/rst9 foo.txt works, but tar xvf /dev/rst9 /folder/foo.txt does not, even though the tarball was created with tar cvf /dev/rst9 /folder/foo.txt. And on the BIG tarball, neither works. I get no feedback at all, just a return to a command prompt. I AM SO CONFUSED!!
 
I'm not sure about tar on Solaris 8, but I believe GNU tar will turn full pathnames relative by default so that you don't accidentally overwrite files without realizing it. Use 'tar tfv /dev/rst9' to see the paths before extracting.
 
tar tvf /dev/rst9 works great - I can SEE the files and pathnames with no problem, I just can't restore them. But I could on a small test tar on a tape.
 
Originally posted by: ScottMac
Check your profile settings.
One of the available settings is the cut-off age to display a post. I think the default is a couple days.

Thanks, all better now. I was set to 100, so I upped that to all the 9s that would fit. But the header only showing one page at a time sort of threw me.
 
tar tvf /dev/rst9 works great - I can SEE the files and pathnames with no problem, I just can't restore them. But I could on a small test tar on a tape.

Are they full or relative pathnames? Beacuse if I create a tarball with 'tar cfvp /tmp/tar.tar ./' I get filenames that start with ./ and IIRC I have to use that to extract them.
 
Originally posted by: Nothinman
tar tvf /dev/rst9 works great - I can SEE the files and pathnames with no problem, I just can't restore them. But I could on a small test tar on a tape.

Are they full or relative pathnames? Beacuse if I create a tarball with 'tar cfvp /tmp/tar.tar ./' I get filenames that start with ./ and IIRC I have to use that to extract them.

They were relative and that fact escaped my notice until this morning. 🙁

Yup, I was just signing on to say that I FINALLY figured it out. That looks like a bad practice to me, since then you have to make sure you are in root before restoring, or it will create a bogus directory structure on top of whatever directory you run it from - not good!

But the root of my problem was that when extracting a single file, you have to use the exact same path in the tar command that the tarfile was created from.

Thanks, Nothinman.
 
Yup, I was just signing on to say that I FINALLY figured it out. That looks like a bad practice to me, since then you have to make sure you are in root before restoring, or it will create a bogus directory structure on top of whatever directory you run it from - not good!

Yes, but it's worse when you're in another directory thinking that you're extracting to there but end up writing files somewhere else on the system. There is an option to make it not do that, but I would very much recommend against using it.
 
Back
Top