Tag Info

New answers tagged

3

Either manually look at the file with ls -l filename, or from a script you can use [ -u filename ] && echo SUID-bit is set See also man bash: -u file True if file exists and its set-user-id bit is set. See also info ls: The file mode bits listed are similar to symbolic mode specifications (*note Symbolic Modes::). But ‘ls’ ...


2

executing ls -l you will get something like: -rwSr--r-- 1 user user 8111573 Sep 26 2012 net-snmp.tar where the S (can be also s) indicate this file have SUID set S is set when you do not have execution flag set s is set when you have execution flag set


2

Shell scripts are very similar to the commands you'd type interactively in the shell. In this case, the -o option is telling g++ where to put the binary. So you just tell it you want it in the binary directory: g++ lesson01.cpp -o Binary/lesson01 You can run that interactively (by typing it into the shell), or you can put that in a shell script—both will ...


3

The canonical starting point for understanding all this is Ken Thompson's Reflections on Trusting Trust, where he demonstrates that you can't ever really trust a system not to have back doors, even if you rebuild from source. The reproducible builds initiative in Debian aims to help provide trust guarantees to users in spite of this. Imagine you're running ...


2

This means Debian will guarantee that the Debian binary packages you have are from the sources exactly and not from some other code. They will keep info about the binaries in the package trackers. When you get the binary packages on Linux distributions you can not be really sure if the binaries are from source code that is released by the distribution.


13

I don't know if your version of sed will be binary-clean or if will choke on what it thinks are really long lines in its input, but barring those issues, editing the string in-place should work. To see whether it does, compare the old and new versions with cmp -l. It should tell you whether or not the only three differences between the two files are those 3 ...


1

file.vdi is in all likelihood a sparse file. This is very common with virtual machine disk images: parts that have never been written to are left as holes in the file that don't consume space. You can confirm by checking whether the length of the original file matches its disk usage: ls -l file.vdi; du file.dvi I expect that ls -l will report 14GB (actual ...


2

Your binary isn't executable, as indicated by the ls -lh output. To fix this, chmod 755 cataclysm Then you should be able to run ./cataclysm given that ldd shows you have all the required libraries already.


2

While the Stack Overflow question seemed to be enough at first, I understand, from your comments, why you may still have a doubt about this. To me, this is exactly the kind of critical situation involved when the two UNIX subsystems (processes and files) communicate. As you may know, UNIX systems are usually divided into two subsystems: the file subsystem, ...


1

This is not always the case when replacing a .jar file. Jar resources and some runtime reflection class loaders are not read from disk until the program explicitly requests the information. This is only an issue because a jar is simply an archive rather than a single executable that gets mapped into memory. This is slightly off-stopic but is still an ...


2

My understanding is that due to memory mapping of a running process, the kernel would not allow updating a reserved portion of the mapped file. I guess in case a process is running then all of its file is reserved hence updating it because you compiled a new version of your source actually results in creating a new set of inodes. In short, the older ...



Top 50 recent answers are included