Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-15-2011, 07:33 AM   #1
Registered: Feb 2009
Posts: 98

Rep: Reputation: 15
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

[]#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
Old 06-15-2011, 07:47 AM   #2
Registered: Apr 2011
Distribution: OpenSuse 12.3 , Slackware 13.1 ; Centos 6.2 ; Fedora 14
Posts: 90

Rep: Reputation: 8
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

cacls /E filename /G USERNAME:N

cacls /?
in cmd for more info on cacls.
Old 06-15-2011, 07:46 PM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,395

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot change file permissions on a mounted file system koodoo Linux - Newbie 2 04-06-2010 11:22 PM
File permissions v. directory permissions Completely Clueless Linux - Newbie 7 07-09-2009 08:33 AM
Windows file permissions with a Linux file server joseph_k Linux - Server 3 05-09-2008 12:54 PM
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 12:00 PM
locking a usage policy file/ftp file permissions gbow Linux - Newbie 0 02-16-2004 05:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:22 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration