Tag Info

New answers tagged

0

This will not cover all use-cases as it restricts use to a text-editor. But, if you only care about read-access, you might find this helpful for some situations. vim, when run on a tarball will show you the content hierarchy of the archive (similar to how it will display a file hierarchy if run on a directory). By selecting one of the files in the list, it ...


1

I had a detailed look into the udisks2 source code and found the solution there. The devices correctly mounted under user permissions were formatted with old filesystems, like fat. These accept uid= and gid= mount options to set the owner. Udisks automatically sets these options to user and group id of the user that issued the mount request. Modern ...


2

rootfs mounted on / is an in-memory filesystem which typically only contains the tools needed to mount the “real” root filesystem and is emptied after this is done. The initial content of the rootfs are loaded from an initramfs image stored inside or next to the kernel binary and loaded by the bootloader. The root filesystem on flash is ubi0:root. This is a ...


2

As per man mount.cifs: uid=arg sets the uid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a username or a numeric uid. When not specified, the default is uid 0. The mount.cifs helper must be at version 1.10 or higher ...


2

This is normal unix behavior, however you can make cifs ignore remote user information. mount -t cifs -o \ user=blarg,password=blarg,nounix,uid=0,gid=0 \ //10.151.170.170/events /var/blarg/copy-to This makes all files look like they are owned by root:root. All files created will be owned by the user who mounted it; in this case, blarg. nounix ...


1

The methods you've mentioned are how I would've attempted to do it, in particular ACLs using setfacl to do it. I'd try and set the ACL at the top and make it so that it's recursively applied, but this would not protect files/dirs that are moved into this directory which are lacking it, I believe. You could use something like incron to run a script anytime ...


1

You can choose the permissions of the files and directories on a vfat filesystem in the mount options. Pass fmask to indicate the permission on files that are not set, and dmask for directories — the values are the same as in umask. For example, to allow non-root users to only traverse directories but not list their content, and create files and directories ...


2

The vfat filesystem does not support permissions. When you try to modify ownership or permissions on the mount point while the partition is mounted, it applies to the root directory of the mounted file system, not the directory that you are mounting on top of. If your goal is to make the filesystem read-only, try mounting with -o ro. You can do it without ...


0

One solution I find for this problem is to use udev. Edit /etc/udev/rules.d/99-automount.rules with your favorite editor and add those lines: # --sync to allow removal without corruption # exclude sda since its the rootfs ACTION=="add",KERNEL=="sd[bcd]*", RUN+="/usr/bin/pmount --sync --noatime --umask 000 %k" ACTION=="remove", KERNEL=="sd[bcd]*", ...


1

This is not a term that I've heard with regard to filesystems. df -h should show the usage of all partitions. You can also use df -i to ascertain the number of inodes still available, which can contribute to a full filesystem. If this is the case you need to track down 0-byte files and remove them.


2

If it's anywhere it would be in /var/log. But I suspect you will not find this IP address there. Copies of previous weeks log files are kept there as well, typically 4 weeks worth, as <name of log>.#. The # is an actual number such as 1 or 2, denoting how many weeks back this file is. Example Here are the first 10 from an Ubuntu 12.10 system I ...


0

To address the error-message portion of the question, you might choose to run a script from cron instead of the system command. 24 9 * * * /usr/local/sbin/sync_data.sh Create the file as /usr/local/sbin/sync_data.sh, giving root ownership and execute permission: chown root:root /usr/local/sbin/sync_data.sh && chmod 0700 ...


5

The go to tool for syncing data is rsync. You can sync either at the directory level or just the contents of a directory like so: Examples directory sync 24 9 * * * rsync -a /home/fan/Data /media/T/ contents sync 24 9 * * * rsync -a /home/fan/Data/ /media/T/Data/ The first example will sync the directory Data from /home/fan to the directory /media/T. ...


0

Using rsync: 24 9 * * * rsync -a /home/fan/Data/ /media/T/Data Add the extra / at the end of the name of the source directory will tell rsync to copy the contents rather than the full directory. rsync will also avoid copying files that have the same timestamps/size (ie ones that don't need to be copied in 99.99% of cases). Also consider using the ...


15

You can use the command archivemount to mount archives such as .tar.gz. $ ls files.tgz mnt/ $ archivemount files.tgz mnt $ ls mnt file1 file2 [... Perform desired read/write operations on the archive via mnt/ ...] $ umount mnt [... Any changes are saved to the archive ...] See the man page for archivemount for more info. It's often times not ...


6

You're either talking about a FUSE filesystem (filesystem in userspace - Linus calls them toys) or a custom compiled kernel OR squashfs. Squash is not exactly as you describe - you cannot simply mount a tarball for instance - not with the kernel supported VFS, anyway - but you can certainly mksquash any number of files or directories and mount the resulting ...


6

First off, if you delete a folder that inotifywait is watching, then, yes, it will stop watching it. The obvious way around that is simply to monitor the directory one level up (you could even create a directory to monitor especially and put your work_folder in there. However this won't work if you have a folder underneath which is unmounted/remounted ...


0

If I recall correctly you use the port= option to specify destination port. For example: sudo mount -t nfs -o port=1122 11.11.11.111:/some_directory /mnt/test/


2

You can specify options using the flag -o key=value. In this case: sudo mount -o port=1122 -t nfs 11.11.11.111:/some_directory /mnt/test/ For more information, do man mount_nfs


0

First check the file systems supported in the kernel. [kevin@hexcore ~] $ cat /proc/filesystems .... ext3 ext2 ext4 .... I assume that you are trying to mount the same SD card from which you are running the Linux. If so, I assume, quite reasonably, that it has native file system support in Linux. To make sure you have loaded the SD card ...


2

Basic reasons: (updated) 1) Your system does not (properly?) initialize or does not recognize the SD when booting from flash. Is there the /dev/mmcblk0 device after you boot from flash? What does fdisk -l /dev/mmcblk0 say? 2) There is no file system on /dev/mmcblk0p1, you need to create a file system first (mkfs ...). Check with file -s /dev/mmcblk0p1 3) ...


-1

Maybe you need to use (parted command) due to partition size: # /sbin/parted /dev/mmcblk0p1 (parted) mklabel gpt this disk will be lost. Do you want to continue? Yes/No? yes .... (parted) quit To make sure that the partition is properly created use /sbin/parted /dev/mmcblk0p1 print” Then you have to format the created partition /sbin/mkfs -t ...


1

This isn't working because you're trying to mount the target on the device (not the other way around like you're supposed to). Simply swap the arguments: mount /dev/sda3 /home/myfolder/mounting_folder


3

As commented by goldilocks, mount -t expects the filesystem type to come after -t, so it won't work. Otherwise it sounds like you just need to specify the filesystem type. If you don't know the filesystem type, then there are a list of methods to find out in this answer. If the file command is available, this is probably the best method. As root you would ...


-1

I seem to remember this is the error you get when the type of partition you're trying to mount isn't supported.


0

I have found the need to identify individual disks in my raid arrays also and used "sudo smartctl -a /dev/sd?" to find out the serial numbers of identical disks. You currently don't have either sda or sdb unmounted as noted by your cat /proc/mdstat showing [2/2] [UU] for all devices. If you wanted to use one of these disks for /home2 it is likely you want ...


3

Both SSDs are already fully committed to your three RAID-1 partitions. You don't have any free space on either of them. Edit: yes, that is what I am saying. The df output shows you that /dev/md[12] are mounted (I'm guessing /dev/md0 is swap; /cat /proc/swaps will confirm that). cat /proc/mdstat then tells you that /dev/mdN is a RAID-1 made up of ...


0

The credit goes to Gilles for this answer; Gilles noted int the question comments that the '-n' switch ignores the mtab and unmounts anything listed in /proc/mounts. From the manpage: -n Unmount without writing in /etc/mtab. So to answer my question of how to unravel a --rbind mount, this is the full command that worked for me: grep /mnt/chroot/sys ...


4

The following command gives a unique name for the mount point containing the file $file: df -P -- "$file" | awk 'NR==2 {print $1}' This works on any POSIX system. The -P option imposes a predictable format; the first field of the second line is the “file system name”. Thus, to check two files are under the same mount point: if [ "$(df -P -- "$file1" | ...


4

You can check this with stat: $ stat -c '%d %m' /proc/sys/ 3 /proc Shows you the device number and where your directory was mounted.


4

test $(df -P $path1 $path2 | awk '{if (NR!=1) {print $6}}' | uniq | wc -l) -eq 1 Works with any number of paths.


0

Total guess but have a look at your /etc/pam.d/* files and make sure that any PAM configurations related to pam_mount are setup as follows: auth optional pam_mount.so ... auth include system-auth use_first_pass ... session optional pam_mount.so This would seem to be backed up by the pam_mount.conf man page: excerpt Messages ...


2

Your /etc/filesystemssays for both filesystem mount = false. So, edit your system /etc/filesystems to have: /appli2/oracle/DATA/oradata05: dev = /dev/lvoradata05HIST vfs = jfs2 log = /dev/loglv01 mount = true account = false /appli2/oracle/DATA/oraarch: ...


1

Thank you to z3bra for having pointed me ldm project some was a very useful project: https://github.com/LemonBoy/ldm It's a lightweight device mounter following the UNIX philosophy written in C and based on udev and libmount. It works really well. To install on debian from the source: git clone https://github.com/LemonBoy/ldm.git make sudo make install ...



Top 50 recent answers are included