This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
KOD_28's profile picture

Personal files synchronised

Started by KOD_28, 04 May 2013 - 09:07 AM
KOD_28 #1
Posted 04 May 2013 - 11:07 AM
Ohai

I'm looking for a program. :P/>

On my server I just had a question from one of my members which asked me "Could you please do profiles with own files synchronised on a server"
But I don't know how to do it… :mellow:/>
Can someone please help me ?

EDIT : I'm actually using version 1.5 of CC so it must work remotely ;)/>

Thanks a lot !

(sorry if my english isn't very good)
GravityScore #2
Posted 04 May 2013 - 11:40 AM
I'm not entirely sure what you mean. Do you mean a system where a user can log in on any computer, and then see all the files they've uploaded to a server, and can modify, delete, upload, download files?

If you want to go about doing this, I would recommend using a system where a computer would act as the server, and would constantly have a program running on it to serve incoming requests over Rednet. Then on the computers you wish the user to log into, you could have that program send messages to the server, instructing it to verify credentials the user has tried to log in using, create new accounts, list all the files the user has, upload files, download files, delete files, etc…

To do this, whenever the program that's constantly running on the server computer receives a message such as "create account GravityScore 12345", it would create a new account with the username GravityScore and the password 12345, and you could do this for every action you want the server to perform. Then, whenever the user uses the program on any computer, the program would download a list of all the files the user has stored on the server under their account, and would allow the user to perform actions with these files (download, modify, etc).

For sending messages, I recommend using Rednet, which you can find a tutorial on here (assuming your server has CC 1.5+ installed).
KOD_28 #3
Posted 04 May 2013 - 12:00 PM
Yeah that's what I want to do !

But is it possible that each user has his own files that the other users can't not see/edit/delete ?
angellus #4
Posted 05 May 2013 - 01:00 AM
Considering writing something that gave user dedicated harddrive space and a way to connect directly and sync with it would be a security risk, I would recommend them using pastebin and an updater program to manually sync their files. i just made post about how I made one on a server I play on. It also requires absolutely no help from you (the admin) to do. Link to post
Smiley43210 #5
Posted 05 May 2013 - 01:26 AM
Considering writing something that gave user dedicated harddrive space and a way to connect directly and sync with it would be a security risk, I would recommend them using pastebin and an updater program to manually sync their files. i just made post about how I made one on a server I play on. It also requires absolutely no help from you (the admin) to do. Link to post
That would require users to remember strings of random characters. Perhaps using a website as a medium to store/retrieve files would be better, as rednet range won't come into play, and players don't need to remember the id of their pastebin url. However, you would need a website to store everything and code to handle the requests.