LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   file permissions (https://www.linuxquestions.org/questions/linux-newbie-8/file-permissions-886474/)

asifbasha 06-15-2011 07:33 AM

file permissions
 
Hai to all

my web server is running on fedora 15 with apache . I have a file called test.php in /var/www/html/ directory with the permission of 700

[root@big.com]#ls -l test.php

rwx- --- --- root root

but when i copy the same file to windows xp its get open and i can be able to edit also ?.. ho can i prevent this so that the file should open,edit,execute only on linux machine ..

Thanks in advance to all

Genocide_Hoax 06-15-2011 07:47 AM

This is beyond the scope of this forum. As far as I know there is no way you can do it from linux. But there is one thing that you can do to get the desired result which is after you copied to file in windows you'll have to edit the access list of the file in windows itself. You can use the cacls command of windows to set the access list of a particular file. You must use something like

Code:


cacls /E filename /G USERNAME:N

type

Code:


cacls /?

in cmd for more info on cacls.

chrism01 06-15-2011 07:46 PM

Expanding on the above, ownerships and perms on *nix and MS are completely differently constituted and will not (can not) be preserved if you copy from one OS to another.
This is generally true even between systems with the same OS, unless the same users with (in *nix case) same uid have been created first.


All times are GMT -5. The time now is 10:23 PM.