How to use cp.exe from Cygwin and preserve permissions [closed] - permissions

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm using cp.exe from Cygwin to copy files in Windows 7. Unfortunately, when I do the permissions of the file change.
I've tried using:
cp --preserve=all
But that doesn't work either, and when I check the security of the original file vs the copy, the copy has different permissions.
Clearly there must be a way to preserve permissions when copying using Cygwin, but I can't find it.

I believe adding option noacl to the /cygdrive mount point in /etc/fstab will do what you want.
$ cat fstab
# For a description of the file format, see the Users Guide
# http://cygwin.com/cygwin-ug-net/using.html#mount-table
# This is default anyway:
# none /cygdrive cygdrive binary,posix=0,user 0 0
none /cygdrive cygdrive binary,posix=0,user,noacl 0 0
See http://cygwin.com/cygwin-ug-net/using.html#mount-table and discussion from the cygwin mailing list.

I did some more investigation about this after asking the question above.
Per this discussion with one of Cygwin's developers, it appears that Cygwin doesn't care about Windows permissions, and just sticks with the POSIX ones.
From what I can tell, POSIX permissions are a whole separate thing from the Windows ones, so yes, it's great that they're supported, but ultimately, Cygwin can't copy files and maintain normal Windows permissions. Making it useless to me. Much better to use Python or Ruby.
I would love to be proven wrong though.

Related

Does Zerobrane provide an "include" mechanism? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
To Zerobrane users, since this is not a question on lua :
I use Zerobrane for editing lua programs that are to be used with LuaLatex. Very nice !
I make all tests there before using the developments in LuaLatex. So, at the beginning, the programs are run there. I need to tidy up this part, on ZeroBrane, by making files hierarchical, with a master file and slave files around.
Once again, it is a question about ZeroBrane, not about how I use the file within LuaLatex (I know enough about doFile, luaexec and co)
Does this exist ?
I saw PaulK passing by, if he could drop a line, it would be appreciated ...
An "include mechanism" as you call it is usually a language feature, not some feature of an IDE.
Lua provides various functions for running code from other files.
dofile, load, loadfile, require, ...
The most convenient and common is require which will find a file by its name in a given set of directories and execute its contents.
Read this:
https://www.lua.org/manual/5.3/manual.html#6.3
https://www.lua.org/pil/8.1.html
https://www.tutorialspoint.com/lua/lua_modules.htm

MarkLogic 8, forgot user name I used. What can I do? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I just installed MarkLogic 8 and forgot user name I used. What can I do?
Since you just installed, if you haven't done anything that would bother you to lose, it might be simplest to blow it away and start again. Uninstall MarkLogic, then remove the data directory (rm -rf /var/opt/MarkLogic on Linux), then reinstall.
Again, this is only if you haven't started loading up data, setting up apps, etc. If you have, go with DALDEI's answer.
If you have physical and legal authority over the system, you can copy off the Forest directories (except security), re-install from scratch then re-attach the data. Most of the metadata will still be intact and as long as you have the new admin password you can patch up the parts that are not.
That is if you havent already customized a complex system - the hardest part to restore will be the objects in the Security database, those will be lost.
( users, permissions, roles etc) There is also the group and database configurations - those are not secured in the same ( they are stored in XML files on disk) so if you have system OS root access its likely possible to reconstruct most of the configuration data as well.
If this is a mission critical system I suggest contacting support, there are some methods for recovery of most of your data if done very carefully and if you have physical access and the data is otherwise unencrypted and accessable.

Avoiding accidental delete of files on external hard disc [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Recently I deleted my huge collection of data that I stored in my hard disc accidentally. I recovered it using some recovery software.
But I want to set my hard disc in such a way that, nobody can delete the files, even it is administrator of my system or other system , until the permission is changed.
I don't like to use any external software for my need.
What can I do?
The closest you can get to this, on Linux and OS X, at least, is setting the sticky bit on the directory containing the files and changing the owner of the directory and those files to a dummy user.
chmod +t /path/to/dir
chown -R someone /path/to/dir
The sticky bit makes it so only the file owner or root (or, on OS X, someone with write access to the directory) can delete or rename files in a directory.

How to prove that images were stolen? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How can I prove that images were stolen from a website?
Is there any way to check from when an another website have the same images? I have no any access to the server.
Thanks for any idea!
UPDATE:
No, I'm not the one who forgot watermark. An old client of mine just found me with this question. Actually found Google cached page which we can use, but still interested if any other solution is exist. Like any image format contains any date attribute in it?
If you're using a Unix-based operating system, you might have access to cURL. Try running
curl --remote-time --remote-name http://url-to-your-image/
and see if you get a timestamp that is different from the exact time you downloaded the file. Not all servers respond with the time, but it might be worth an attempt.
But generally, if it's your original work, then you should have a copy of the image with higher resolution and/or lower compression rate, right? That should be enough to prove which of the images is the stolen one. Intellectual property rights on the Internet is a mess, though, for several reasons. But even if you can't take legal actions, you might have better luck convincing an administrator to remove the content.

How do I run robocopy without copying extended attribute information? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Greetings,
I've got a bat script which copies certain information from a computer onto a USB hard drive using Robocopy. The hard drive is FAT formatted and therefore doesn't support directories with extended attributes, leading me to robocopy error 282 as described here.
How do I tell robocopy to copy all the attribute information EXCEPT for the extendable attributes?
I still need help, but, some helpful info from the googling ive done thus far
Robocopy Command-Line Options: http://www.ss64.com/nt/robocopy.html
What is an Extended File Attribute: http://en.wikipedia.org/wiki/Extended_file_attributes
Windows Hotfix (which would be great if I wasn't copying to a USB hard drive): http://support.microsoft.com/kb/329145/en-us
EDIT: Wow, the file system isn't FAT, I was wrong. Its RAW.
I found I only got the 282 error when copying direcories with robocopy. So I used xcopy with /T /E to create the directory structure. I was then able to use robocpy to copy all the files without error.
Convert FAT USB hard drive to NTFS using convert command (converting in this direction won't delete the data):
http://technet.microsoft.com/en-us/library/bb456984.aspx
eg:
convert e: /fs:ntfs