Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cheapo NAS device - file date/time issue
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Hardware
View previous topic :: View next topic  
Author Message
spottedcat
LXF regular


Joined: Mon Oct 31, 2005 3:14 pm
Posts: 971
Location: UK

PostPosted: Sat Nov 11, 2006 5:49 pm    Post subject: Cheapo NAS device - file date/time issue Reply with quote

I've just bought myself this LAN HDD Enclosure from Maplins. It can function as both an SMP server and FTP server. As a (relatively) cheap and cheerful solution it's working quite well. Dead easy to access it from the Gnome desktop. It's Windows that's defeated me atm. Smile

However, there's a problem - at least for me. When I copy files from my internal disc to the device, all the files get date-stamped with the date/time held in the device's internal clock which, fortunately, I can synchronise with a time server. This is a limitation for me because for many files I need to retain their last modified time rather than last copied time. I've noticed that some (all? most?) files I've downloaded from various websites get time/date stamped with current time rather than when they were created. So my question is: is this issue something to do with server protocols or could this be down to the firmware in the device? Or - does anyone know a way I can get around it?

There were a couple of little wrinkles getting the thing set up so if anyone is interested I could post what I discovered.

Edit: Oh, by the way. This from the above link:

Quote:
OS support ME/2000/XP, MAC OS X, Linux


Wink
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7627
Location: Midlands, UK

PostPosted: Sat Nov 11, 2006 9:05 pm    Post subject: RE: Cheapo NAS device - file date/time issue Reply with quote

Couldn't you maintain the file properties if you tarballed them up first?

I see ebuyer are still doing the NSLU2 at a reasonable price, amazon have put it up to over 60.
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
spottedcat
LXF regular


Joined: Mon Oct 31, 2005 3:14 pm
Posts: 971
Location: UK

PostPosted: Sun Nov 12, 2006 2:59 pm    Post subject: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Rhakios wrote:
Couldn't you maintain the file properties if you tarballed them up first?


I'm sure I could, but I haven't worked out how I can unpack a tarball from within the server. If I double-click on a tarball in a Nautilus window displaying a fileserver folder I get a 'cannot open' error. And I haven't worked out how to cd into the fileserver filesystem to use the command line. It must be mounted somewhere, but where? Can anyone help? I'm pretty ignorant about networking generally.

Whether I drag and drop into a 'smb' or 'ftp' window I get the same date/time change. One way round is for me to take the HD out, put it in an usb-enclosure, copy all the files, and then put the HD back into the server. I only need to maintain the original date/time on my photo collection and a large number of word-processor documents which I may wish to access but not to modify.

Rhakios wrote:
I see ebuyer are still doing the NSLU2 at a reasonable price, amazon have put it up to over 60.


Yes I was looking at that. The firmware is Linux-based and I've even found a website where you can get alternative Linux-based firmware for it. But because you need one or two usb hard-drive enclosures, it's not quite so tidy, and with the one I've bought, there's a facility in the firmware to sleep the hard disc after a period of inactivity. You can set anything from 5 to 60 minutes.

If anyone else is following this and was thinking of the Netgear SC101, be warned. Apparently, when they say system requirements, Windows, Windows or Windows, they mean it. It comes with a Windows driver so that the server is seen as drive X: Evil or Very Mad and it cannot be used with Linux ar MacOS. Unless, that is, the information I found is out of date because I also read somewhere that Netgear were working on Linux and Mac drivers. And, if that's the case, more power to their elbow, say I. Smile
Back to top
View user's profile Send private message
shifty_ben
LXF regular


Joined: Tue Oct 04, 2005 10:56 am
Posts: 1292
Location: Ipswich

PostPosted: Sun Nov 12, 2006 3:34 pm    Post subject: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

if you mount the Samba share then presumably you could use

touch -m -t [time] /path/to/file

not the cleanest way of doing it, and its obviously going to cause issues if you have a lot of files to go through. Not to mention the firmware may decide to change it back when you unmount the share.

What about copying the tarball across so that gets the modified time, then mount the share and unpack it with tar? again same issues as above with unmounting though
_________________
Need a New Signature
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
spottedcat
LXF regular


Joined: Mon Oct 31, 2005 3:14 pm
Posts: 971
Location: UK

PostPosted: Sun Nov 12, 2006 6:08 pm    Post subject: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Ah, Ben. Thanks for your interest, but I think you misunderstand me. At the moment I have all my personal files on a separate shared data partition on my main multiboot machine, and on various backups - and they all have the correct date/time stamps. I had intended to make the fileserver my principal working data store and to make archive backups from there. You know - time to work on a document - let me see, I think it's a laptop/Fedora day today.Wink But when I copied from my present main data partition all the date/times got rewritten to current. That's not a problem atm because if I can work out how to get round this I can simply copy and rewrite them over from my present main data store again. I don't have to touch -t anything.

shifty_ben wrote:
What about copying the tarball across so that gets the modified time, then mount the share and unpack it with tar?


That's what I want to do, except I want the current unmodified times, but I can't work out how to unpack the tarball once it's in the fileserver HD. What is the '/path/to/file' when it's in the server? Confused Once I've got all the files into the fileserver with their original times preserved I'm quite happy if the time gets reset when I edit a file - that's what happens anyway - but I may still have a problem when archiving.

I'll probably end up putting the HD in an usb enclosure to get the original copying done - it's just a 5-minute screwdriver job - but I'd like to learn how to manipulate tarballs held in the server.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8450
Location: Warrington, UK

PostPosted: Sun Nov 12, 2006 6:08 pm    Post subject: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Are times corrupted when using FTP too? wget has an option to preserve timestamps.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
spottedcat
LXF regular


Joined: Mon Oct 31, 2005 3:14 pm
Posts: 971
Location: UK

PostPosted: Sun Nov 12, 2006 6:17 pm    Post subject: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

nelz wrote:
Are times corrupted when using FTP too? wget has an option to preserve timestamps.


Yes. Or rather uploading from the computer to the server using ftp and the gui changes the time. I hadn't thought of wget. Embarassed Thanks for that. But I need to go host > server as well as server > host in order to get the archive onto the server uncorrupted in the first place. According to the FM, wget only retrieves files. I need a wgive command as well. Smile Is there such a thing, or a switch for wget?

Edit: You've given me an idea, nelz. I was just dragging and dropping with nautilus windows. I'll try gFTP later and see what happens.
Back to top
View user's profile Send private message
spottedcat
LXF regular


Joined: Mon Oct 31, 2005 3:14 pm
Posts: 971
Location: UK

PostPosted: Sun Nov 12, 2006 7:39 pm    Post subject: RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Ho hum, gFTP won't play ball. It connects OK but comes up with a 'cannot parse listing' error. It works OK with a little-used subdomain I have with my ISP, so I tried uploading a file to that and, sure enough, the date and time got changed to the time of transfer. At least I've learnt one thing - this date/time business is to do with network transfers and not a 'feature' of my fileserver device.

Perhaps the command line ftp has a switch to prevent this happening. Trouble is, I've never used the ftp command before. Time to get out the screwdriver I think.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8450
Location: Warrington, UK

PostPosted: Sun Nov 12, 2006 9:47 pm    Post subject: RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

You could try wput or ncftp. The latter is most likely to have the options you need.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
spottedcat
LXF regular


Joined: Mon Oct 31, 2005 3:14 pm
Posts: 971
Location: UK

PostPosted: Sun Nov 12, 2006 11:31 pm    Post subject: RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Thanks, nelz. It's not that I'm unwilling to RTFM, it's just that often I don't know which FM to R. I'll read up on both.
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8450
Location: Warrington, UK

PostPosted: Sun Nov 12, 2006 11:48 pm    Post subject: RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Does the device support SSH or rsync?
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
spottedcat
LXF regular


Joined: Mon Oct 31, 2005 3:14 pm
Posts: 971
Location: UK

PostPosted: Mon Nov 13, 2006 9:27 am    Post subject: RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Interesting question, nelz. I'd wondered about ssh, but as I've never had the need for it until now, it represented yet another rtfm job. Smile

The 'documentation' that comes with the device is sparse - just a small instruction manual written in that strange dialect of English that results when you translate from the original Chinese via Serbo-Croat and Martian. It merely covers the various functions that confront you from the web-wased configuration interface - complete with the occasional error.

The device is not branded and nowhere states what the basic OS is underlying the firmware, but if I was a betting man I would put serious money on it being one of the Linux-based NAS firmwares that are floating about on the web. My priority is to reassure myself that I can get around this date/time nonsense so that I can use it as my main file repository from all my machines. You've given me several leads already. Then, perhaps, I'll read up on ssh and see if I can ssh into it.

Of course, if I was a real geek I'd be trying to hack the firmware or replace it with one of the OS ones. I found a website that is devoted entirely to doing just that on the Linksys device that Rhakios mentioned. I suppose everyone needs a hobby. Very Happy

Thanks, as ever, for your help.
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7627
Location: Midlands, UK

PostPosted: Mon Nov 13, 2006 7:29 pm    Post subject: RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Well, as the NSLU2 used to be so cheap and I have a few external disk enclosures, I bought two slugs, one is unslung the other not. The trouble is that I never seem to have the time to play with the unslung one, though the other does get my weekly back-up sent to it.
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
spottedcat
LXF regular


Joined: Mon Oct 31, 2005 3:14 pm
Posts: 971
Location: UK

PostPosted: Thu Nov 16, 2006 3:27 pm    Post subject: RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

Update:

The device doesn't support SSH - I can't connect - but I discovered that transferring files from one computer to another via SSH doesn't change the timestamp. Interesting.

I've tried uploading files using ftp, hsftp, tnftp, ncftp2 and wput, some of which have command options that control timestaming, but I couldn't get any of them to transfer files without changing the time/date. I was probably doing something wrong, but life is short so I got my screwdriver out, put the HD into an usb enclosure and uploaded my archive that way. Mission part 1 accomplished. Cool

For downloading: wget -N blahblah works nicely but then I noticed something odd. There were a handful of files with dates predating 2000. But when I browsed them using a Nautilus ftp window - the HD now back in the NAS device - their dates all showed 0100 hours on 1st January 1970. (It was a Thursday, by the way. Wink) All post millenial-change dates were OK. So - I've encountered a millenium bug 6 years too late. Smile And when I wgetted -N them, the times got changed to current. Weird.

Rhakios, if by chance you check up on this thread and read this, could you let me know what the Linksys device does with timestamps on transferred files? Ta. I'm not going to trust my device to my personal files just yet, but it's still going to be useful as a repository for downloaded stuff that I might want to access from anywhere in my network.
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7627
Location: Midlands, UK

PostPosted: Fri Nov 17, 2006 4:56 pm    Post subject: RE: Re: RE: Re: RE: Cheapo NAS device - file date/time issue Reply with quote

I'll have a look when I get home.



No, second thoughts, I'll have a look tomorrow afternoon, I'm socialising tonight (and recovering tomorrow morning).
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Hardware All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast