Tag Info

Hot answers tagged

9

Because access to the underlying device is controlled only by file permissions by default, so if your USB stick contains a POSIX filesystem with a world-writable device node corresponding to a real device in the system, you can use that device node to access the corresponding device as a "plain" user. Imagine a device corresponding to one of the audio ...


6

Another approach is with findmnt: findmnt /dev/sda4 ...to get mountpoint from dev. Or vice-versa: findmnt /home


6

You can use: mount for a list of all mounted filesystems and mount options for each of them; lsblk for a tree of block devices, size and mount point (if mounted); df for a list of mounted block devices, size, used space, available space and mount point.


4

seclabel is an indicator added by the selinux code, that the filesystem is using xattrs for labels and that it supports label changes by setting the xattrs. You shouldn't add seclabel on your own, it should normally be added by selinux automatically if it's enabled. I would try to find a way to ignore that nagios message if you don't need selinux.


3

You're actually asking two questions. The easiest thing to do if you want to know where your home is: cd df -h . Or df -h $HOME Where is /tmp mounted? df -h /tmp ...etc. If you want to know what is mounted on a certain device, mount | grep ^/dev/sda1 (for example). Or mount | grep ^/dev/sd to see all the sd's.


3

Depends on what you're after. If you want to check which of the partitions in /dev/sd* has a default mountpoint and what that mountpoint is, you could do for part in /dev/sd*; do grep -w "$part" /etc/fstab | awk '{print $1,$2}; done However, on most modern systems, partitions are mounted by UUID and not dev name, so a better approach1 would be: for uuid ...


3

The dirty bit is set and cleared in the kernel, when mounting and unmounting a device; see http://lxr.free-electrons.com/source/fs/fat/inode.c?v=3.19#L578 for the implementation. There's no way currently to access this function outside the kernel, except by mounting and unmounting... To set it yourself, you'd need to tweak the device directly; the state ...


3

The /dev tree contains device nodes, which gives user space access to the device drivers in your OS's running kernel.ยน All POSIX type OSes have a /dev tree. The /proc tree originated in System V Unix, where it only gave information about each running process, using a /proc/$PID/stuff scheme. Linux greatly extended that, adding all sorts of information about ...


3

Part I: File system layout Create a Raid1-array out of the 2x640GB (mdadm) and format the array with, e.g., ext4 (You loose all data on those drives!). Format the 60GB SSD with, e.g., ext4 (You loose all data on this drive!). Adapt /etc/fstab on the ubuntu drive: Add two entries for the array and the 60GB SSD. It depends on your flavor to mount the array ...


2

Install jmtpfs (aptitude install jmtpfs) which allows to mount MTP devices. Create the directory if it doesn't exist already (mkdir /tmp/myphone). Then, the following will mount your phone: jmtpfs /tmp/myphone jmtpfs will use the first available device. If you've got more than one connected at a time, you can do jmtpfs -l to find out which one is your ...


2

mount --bind takes two arguments: the path to replicate and the location where it is to be replicated. You seem to be trying to make multiple replicas; to do this, you need to issue multiple mount --bind commands. for d in /var/www/official/*/*/vendor; do mount --bind /var/my/vendor "$d" done


2

For actual forensics scenarios, you do need a hardware blocker. A software blocker isn't good enough because you risk making a mistake, and for legal cases, it's very important to be able to claim without a shadow of a doubt that you did not modify the disk image, and to be able to explain in very simple terms to non-technical people that you could not ...


2

May be you want to use mdadm $ losetup --readonly /dev/loop1 diskimage.part1 $ losetup --readonly /dev/loop2 diskimage.part2 $ mdadm --create /dev/md0 --level=linear --raid-devices=2 /dev/loop1 /dev/loop2 $ mount -o ro /dev/md0 /tmp/mountpoint


2

You can use mount command. It also shows options with which the mounting is done.


2

You're looking for the df command.


1

Talking about "option 2", it's not a good idea to mount an already mounted remote directory. If you mount it on another mount point and depending on what is your processing, you'd lose the lock mechanism. Furthermore, by default, fuse won't make any mount if the mount point is not empty. IMHO, the best way to proceed is what you say: check if the remote ...


1

If all you want to do is mount some filesystems, list them in the file /etc/fstab. Open the file in a text editor (you'll need to be root, you can use the command sudoedit /etc/fstab). Add a line at the end like this: /dev/sda1 /media/windows ntfs-3g allow_other The first column is the reference to the partition where the filesystem is. You can use one of ...


1

In short, you have to have permission to read the files on the source server before you can read them on the destination server. If you don't have an account on the source server with the same UID as on the destination, it will be very difficult at best to read these files. If you have root permissions on the destination and the mount is exported with the ...


1

You can use the sshpass command to login via password authentication, but non-interactively. echo "MyPassword" > passwordfile chmod 600 passwordfile sshpass -f passwordfile [ssh parameters] Using this technique is not recommended, as this causes a number of security issues. From sshpass man page: It is close to impossible to securely store the ...


1

This setup is usually enough. I used this during my external HD's recovery: Disable automount first. (You can do this using gconf-editor on a GNOME setup. I don't know for other systems). Then, you refer to your drive as /dev/sda or /dev/sda1 or whatever in your programs. (sda is usually reserved for boot device. refer to this post to know which sd* is your ...


1

You stipulate that you are allowed to run sudo mount with any arguments. In that case, unless I misunderstand your question, it seems to be trivially easy to gain root access: just create a disk image that contains a setuid-root binary and mount it with sudo mount -o loop! After all, anyone can create a disk image, it's just bytes... To prove it, here's a ...


1

The first 3856080 bytes of this file is a kernel image. After that, there is a filesystem image. The filesystem is at offset 3932160 (3856080 rounded up to the next multiple of 128kB); I found it by inspection, I don't know where the information is stored in the image (it may be related to the erase size on the intended device). The filesystem is JFFS2, ...


1

I think you're describing autofs. Autofs mounts filesystems on demand, that is, when you try to access them. According to this Arch wiki page, it should work with sshfs. https://wiki.archlinux.org/index.php/autofs#FTP_and_SSH_.28with_FUSE.29



Only top voted, non community-wiki answers of a minimum length are eligible