SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to modify, save, update, delete files using limited access?:

    Hello to all.
    I have a question about how to create, save, modify a file in a platform with a limited account access. anyone who can share their opinion give any sample codes or any procedure regarding this matter will be a great help. thanks in advance.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,608
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    You should have no problem provided that the files are on the part of the drive allocated to data - eg "My Documents"
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Member
    Join Date
    Apr 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should have no problem provided that the files are on the part of the drive allocated to data - eg "My Documents"
    __________________
    Stephen J Chapman


    sorry it was my fault. What I'm trying to say is "It is possible to edit/update/modify the registry not a file or a folder in a documents" thanks in advance. I'm hoping your kind consideration. thanks.

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2005
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by k2o View Post
    Hello to all.
    I have a question about how to create, save, modify a file in a platform with a limited account access. anyone who can share their opinion give any sample codes or any procedure regarding this matter will be a great help. thanks in advance.
    This can be a really challenging problem!

    One way is to use ftp, storing it on another host entirely. (kind of over-kill)

    Another way, for unix anyway, is something called the Set-ID bit. When a program with this bit set is run, it becomes the files owner. (it becomes the userid of the one who owns the executable file)

    This doesn't work well for embedded languages (like php) but it does work for some other languages, on some platforms. (perl, c are examples, but for perl to work, it needs to be enabled with sperl)

    Be careful with set-id, it can backfire on you, and has been the enabling factor of more than a few security problems.

    If you're not concerned about the file contents and you're willing to take some risks.. on unix hosts, you can make a directory world writable.

    chmod 777 data/

    However, if you do this, anyone can put files in there (and if the web server is running as a common user for all requests, other people may be able to read the files)

    All of these things depend on the platform in question and what facilities it supports.

    What I think we really need is a web servers equivelant of a "home" directory for the site owner, or at least, something like WEB-INF/ of the servlet world.

  5. #5
    SitePoint Member
    Join Date
    Apr 2010
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yah, This really a challenging problem for me. but thanks for the info about this. I really appreciated. I'll try this and I'll gave an update regarding with this matter. Thanks again.


Tags for this Thread

Bookmarks

Posting Permissions

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