1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Restrict index file in wwwroot for user

Discussion in 'Plesk for Linux - 8.x and Older' started by rvdmeer, Dec 17, 2005.

  1. rvdmeer

    rvdmeer Guest

    0
     
    Hi guys,

    Before asking my question I must say this isnt a plesk based question. Its an unix/linux permission question. Still, based on the experience i can say there are several unix professionals here who might be able to help me with this question.

    We are sponsering a website and therefor created an subdomein. The customer is able to upload files on the subdomein. I would like to restrict his access to the index.html file.

    I changed the permissions on the index.html file to:

    I would say that this solves the problem because I restricted the user permissions on the index.html file. But still, if i'm connecting thru ftp, on his user login, i'm able to change/remove the file. I guess that the permissions are recursive from the home directory who has the permissions to upload.

    Could someone tell me howto restrict the access for removing this file and recreating a new index.html file?

    Thanks in advance.

    Kind regards,
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    As long as this user does not know a lot about Linux, you could set the immutable bit (chattr +i) which should then make the file unchangeable even by root (until that bit is unset).
     
  3. rvdmeer

    rvdmeer Guest

    0
     
    I was thinking too difficult again. Thanks jamesyeeoc
     
  4. jamesyeeoc

    jamesyeeoc Guest

    0
     
    No problem Ronald, it seems that the older I get, the easier it is for my brain to follow the KISS principle. Probably due to having fewer brain cells.... LOL
     
  5. SecondPhase

    SecondPhase Guest

    0
     
    chmod -w index.html

    should work, i don't think they can change a read only file.
     
Loading...