Results 1 to 15 of 15

Thread: Folder & Files

  1. #1
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default Folder & Files

    I have some file/ folder that I don't want anyone to open and read it.
    Just using window default hide files option and open/read permission is not enough for me. As other who uses my PC know my password(i have to give them).
    So I am in search how to secure my files. My decision was to writing my own code to do the stuff and not use available s/w. But I don't know how to start?
    Any help is appreciated.

    -Thanks

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,334
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Prajin View Post
    I have some file/ folder that I don't want anyone to open and read it.
    Just using window default hide files option and open/read permission is not enough for me. As other who uses my PC know my password(i have to give them).
    So I am in search how to secure my files. My decision was to writing my own code to do the stuff and not use available s/w. But I don't know how to start?
    Any help is appreciated.

    -Thanks
    Look at the File class and its methods; the best you can do is to forbid reading access for the owner of the file but somebody else can still read it or s/he can use Java to reinstall that property. Better get rid of those files if you don't trust others and keep them on a USB stick.

    kind regards,

    Jos

  3. #3
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Thanks for the quick reply.

    I think I wasn't clear about my problem in 1st post. Actually I'm owner of the pc and I share it with (other members of my family). So sometime they may poke into these files, which I don't want. I can't also say I won't give my pc password to them nor restrict them the use of PC(that's shameful). And for USB, what if I lost the USB drive in way, I'll lose my data.

    What I want is , keeping my files safe in hard drive of PC but no one can access it except me.
    Few year back,I tried those s/w which will protect your files/folder in drive but in an incident I lost my many files. So right now I want to develop a s/w that can restrict access to my file for others.(like some password protected or hiding files that can't be viewed by window unhide option).

    so is there any way?

    -Regards

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,791
    Rep Power
    19

    Default

    Java doesn't really control these sort of things.
    That's an OS job.
    USB stick would be your best bet, so that the files simply aren't on the machine in the first place.

  5. #5
    berkeleybross's Avatar
    berkeleybross is offline Senior Member
    Join Date
    Feb 2010
    Location
    England
    Posts
    187
    Rep Power
    5

    Default

    What OS are you using?
    Windows XP and later should have something close to what you want built in.
    Just create a new user account for your family, with a different password. They will be able to access common stuff, but not access your private stuff.

    Even better, move to linux ;)

    As Tolls said though, its not really a Java thing, so I think youre in the wrong forum ;)

    Berkeleybross

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,334
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by berkeleybross View Post
    What OS are you using?
    Windows XP and later should have something close to what you want built in.
    Just create a new user account for your family, with a different password. They will be able to access common stuff, but not access your private stuff.
    Read the op and his reply #3 again: he can't restrict the other users in any way (that's how I read the posts). The other users want to know his password (for reasons that are beyond me but I don't want to stirr in other people's family matters ;-)

    kind regards,

    Jos

  7. #7
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Thanks again for understanding me, Josah.

    Actually in past,I did what others have suggested (reply #4), created guest user for others,had Linux too.But it's not good when PC is not personal at all. Right now, I just want to develop s/w that can handle this problem. It's just due to pure interest.
    Whatever thanks everyone for there reply.
    --kind regards

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,791
    Rep Power
    19

    Default

    Write a Java program that acts as a pseudo folder, and stores all these files in a Derby db. Unless they know SQL, and can access the db, you'll be able to stick your personal stuff in there and access it via your Java front end. Gives you some JDBC practice as well.

  9. #9
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Ok. let's see. I will try the idea.

    -Regards

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,791
    Rep Power
    19

    Default

    Good luck.
    No guarantee it's a sensible idea...I'd thought of it overnight, so could be complete tosh.
    :)

  11. #11
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,334
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Tolls View Post
    Good luck.
    No guarantee it's a sensible idea...I'd thought of it overnight, so could be complete tosh.
    :)
    There comes Prajin's little toddler brother; he is quite intelligent already because he knows his big brother's password; here he goes: typedeetypedeetype ... hey what's this file? "type c1a1 <enter>" Eeeww! That's a mess! Let's delete it ... hey, there are more files like that, yuck! They're all unreadable! I'll delete them all! My big brother shouldn't make a mess of his computer like that! Typeteetypeteetype ...

    kind regards,

    Jos ;-)

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,791
    Rep Power
    19

    Default

    I file that under user error...;)

  13. #13
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    here comes the wolf, entered my house compound and gonna blow my house away. But that wolf don't know it's not straw, it's brick - steel. When the wind settle down , with exhausted breathe and tail down wolf will return. Becoz I let it entered my compound but house is a house. Get out bad wolf - get out.

    -kind regards:D

  14. #14
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,334
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by Prajin View Post
    here comes the wolf, entered my house compound and gonna blow my house away. But that wolf don't know it's not straw, it's brick - steel. When the wind settle down , with exhausted breathe and tail down wolf will return. Becoz I let it entered my compound but house is a house. Get out bad wolf - get out.

    -kind regards:D
    You forgot that that wolf is outside but your little brother is already in and he can and will happily destroy everything he wants when unattended for a split second ...

    kind regards,

    Jos ;-)

  15. #15
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Quote Originally Posted by JosAH View Post
    You forgot that that wolf is outside but your little brother is already in and he can and will happily destroy everything he wants when unattended for a split second ...
    Let the brother play around, jump in sofa, dance as such floor is falling but he is forgetting something as wolf did. This is not straw house. He can bang his head, punch the wall in the end it he would suffer.
    Let he use the Key, then would come to the shock.

    -Regards:D

Similar Threads

  1. Selecting Files in a folder
    By ravjot28 in forum New To Java
    Replies: 1
    Last Post: 02-26-2010, 04:25 PM
  2. Replies: 2
    Last Post: 02-20-2009, 07:13 AM
  3. How To Place Three Files In A Folder
    By ramesh.8189 in forum AWT / Swing
    Replies: 4
    Last Post: 02-12-2009, 07:59 AM
  4. Placing Files In Folder
    By ramesh.8189 in forum New To Java
    Replies: 0
    Last Post: 02-06-2009, 12:36 PM
  5. Replies: 0
    Last Post: 10-06-2008, 03:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •