date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,496,166,008,000 |
I'm using netcat to create a backdoor running a python script with the following command:
netcat -l -p 1234 -e 'python /script.py'
then I'm connecting to the backdoor with another shell using:
netcat localhost 1234
script.py is a simple loop that reads input, saves it to a file, and then prints it back. Now whatever... |
Your writes to stdout are being buffered by python, and only written when the buffer is full. There are 2 simple fixes:
Add the -u option to your python command to ask for unbuffered output ('python -u /script.py').
Alternatively, flush the output after each write. In your example, after the line sys.stdout.write( '... | 'netcat -e' not relaying stdout |
1,496,166,008,000 |
I have simple bash nc script:
#!/bin/bash
nc -k -l 127.0.0.1 4444 > filename.out
which listens 4444 port for TCP connection. Instead of redirecting received data to filename.out I would like, if possible, to pass each chunk of data (single lines of text) to script.sh as argument. How do I do that?
Thanks in advance.
... |
This below is the entry point to a multi-input script.
#!/bin/bash
[ $# -ge 1 -a -f "$1" ] && input="$1" || input="-"
# your script's payload here
The #! line is self explanatory I hope
on the second line
$# -ge 1 and is testing for at least one command line argument
-a is the boolean and operator
-f "$1" is tes... | How to pass received data from netcat to another script as argument? |
1,496,166,008,000 |
I want one of machine have a remote control alarm running that can be triggered by any remote machine. More precisely
Machine A is running the service in the background
Any remote machine B can send a packet to machine A to trigger the alarm (a command called alarm)
How would you suggest do do it?
I would use nc:
S... |
Consider this Python3 example.
Server A:
#!/usr/bin/env python3
# coding=utf8
from subprocess import check_call
from xmlrpc.server import SimpleXMLRPCServer
from xmlrpc.server import SimpleXMLRPCRequestHandler
# Restrict to a particular path
class RequestHandler(SimpleXMLRPCRequestHandler):
rpc_paths = ('/JRK75W... | Remote control alarm |
1,496,166,008,000 |
Here is simple server listening to port 80 of localhost:
nc -4 --listen 127.0.0.1 80
Here is the client to connect to server on localhost using source port same as destination port of server:
nc -4 --source-port 80 --source 127.0.0.1 127.0.0.1 80
I get error:
libnsock mksock_bind_addr(): Bind to 127.0.0.1:80 failed (I... |
What you are attempting to do doesn't make any sense. You are trying to create two TCP sockets with the same 5-tuple { SRC-IP, SRC-PORT, DST-IP, DST-PORT, PROTO } therefore the two sockets would be indistinguishable from each other.
Think of it this way: if this were allowed, then, when a TCP packet arrives sourced fr... | Connecting to server on localhost with same source and destination port |
1,496,166,008,000 |
Scenario
Whenever the netcat server receives a connection, I want it to sleep for 2s before returning a HTTP response.
I know we can turn netcat into a simple HTTP server by something like nc -lp 3000 < httprespose.
Question
How do I simulate the 2s delay?
|
I know a way with socat:
socat TCP-LISTEN:3000,fork SYSTEM:'sleep 2; cat httprespose',pty,echo=0
Roughly based on my another answer.
| How to setup simple netcat server which sleeps before it returns a HTTP response |
1,496,166,008,000 |
I've written a small UDP server in PHP which listens on a socket, accepts a command, and performs an action. It's really quite basic. I can connect to it manually like this:
% nc -u host port
(where nc = Ncat: Version 7.50 ( https://nmap.org/ncat ))
As I enter commands, I see the resulting response. It works exac... |
Your code is most of the way there, all you need to do now is to treat $cmd as a queue of newline-terminated strings. In naive Python-ish pseudo-code because I haven't written PHP for a long time:
input = ''
try:
first_command, remaining_input = input.split('\n', 1)
execute(first_command)
input = remaining... | problem piping data into nc |
1,496,166,008,000 |
I was curious to know how much traffic the Linux kernel could handle on the loopback network, so I decided to benchmark it. In one terminal, I ran:
% nc -l -p 5235 127.0.0.1 > /dev/null
And in another I ran:
% nc 127.0.0.1 5235 < /dev/zero
Then to actually measure traffic I ran sudo nethogs lo. This shows an entry f... |
This is because the kernel doesn't really distinguish between inbound and outbound traffic beyond the source and destination IP addresses. The packets don't get "double-counted" because the kernel looks at the source IP, sees that it's local, classifies it as outbound, and doesn't bother classifying the packet any fur... | Why does NetHogs report 0 KB/second while benchmarking lo? |
1,496,166,008,000 |
Im trying to create a rather basic script to run through a list of servers and check if the SSH port is open using nc. I've tried a few different ways, but can't seem to get this to work. I am definitely not great at any type of scripting.
Here is the script. I just want it to perform an action if it sees "succeeded"... |
Notes, too long for a comment.
server.txt could better be named server-list or servers.txt if you wish.
Use lower case variable names like, avoid SERVER and alike, could better be named server_ip anyways, because it is unclear if you use host names or IPs.
Double quote all non-integer-number variables like "$server... | Failing IF in a WHILE loop in BASH script that checks for open 22 ports |
1,496,166,008,000 |
I want to check if I can connect to Rspamd's Fuzzy port and have a very strange problem - I can ping a the host and get an answer (0% packet loss). But when I try to telnet him, I get "No route to host":
# telnet 88.99.142.95 11335
Trying 88.99.142.95...
telnet: Unable to connect to remote host: No route to host
And ... |
The target port is blocked by the target firewall (at least for your and my IP addresses).
If you run tcpdump -i any -n icmp then you see a host unreachable - admin prohibited ICMP packet.
| Ping works, but I get 'No route to host' even though my firewall is off |
1,496,166,008,000 |
every time that I'll send a thing from computer A to computer B with nc, I to use these commands,
Computer A
tar cfp - film.mp4 | nc -w 3 192.168.xxx.xx 1234
Computer B
nc -l -p 1234 | tar xvfp -
My question, I have openssh, how can send mine videos, file, directories,.. with ssh and nc, without to used other progra... |
@muru's comment is very valid, but for the sake of academical purpose:
Computer A:
cat source | ssh user@ComputerB 'cat > destination'
(Assumes password-less authentication by public key.)
| netcat with ssh |
1,496,166,008,000 |
Wait for file changes and send new lines to a TCP port server.
I've tried
nc 127.0.0.1 1234 -c "tail -F /var/log/changes.log" &
But get broken pipe
|
I do not know which version of netcat you are using, but mine does not have a -c parameter. However, tail -F /var/log/changes.log | nc 127.0.0.1 1234 works for me.
| How to send new lines from file to a tcp port? |
1,496,166,008,000 |
I expected this:
nc -l localhost 7000 </dev/null &
nc localhost 7000 </etc/profile
and this
nc -l localhost 7000 </etc/profile &
nc localhost 7000 </dev/null
to finish after printing my /etc/profile
but both command groups end up getting stuck (both processes in the first case; in the second case, the server finishe... |
I'm using netcat and not gnu-netcat; I'm not sure what version you're using, but if it's gnu-netcat the options might be different.
I have a -q option:
-q seconds after EOF is detected, wait the specified number of seconds then quit
So, if I do:
$ nc -l localhost -p 7000 -q 0 < /etc/passwd
Followed by:
$ nc localho... | nc getting stuck unexpectedly |
1,496,166,008,000 |
I've setup port-forwarding on my mac like this:
sudo sysctl net.inet.ip.forwarding=1
echo "rdr pass inet proto tcp from any to any port 445 -> 127.0.0.1 port 5441" | sudo pfctl -ef -
To this setup, I am running a server using nc like this:
$ nc -l 5441
When I try to connect to this server via telnet, the attempt fai... |
A rdr is only a redirect; one also may need a pass (or appropriate clicky around in the System Preferences) to permit access to that port. This works for me (though I've almost totally disabled the Apple firewall rules on my Mac OS X 10.11 laptop) in /etc/pf.conf:
set skip on { lo0, vboxnet0 }
rdr pass inet proto tcp ... | Port forwarding isn't working on mac osx |
1,496,166,008,000 |
I'm trying to debug why data isn't being sent over a Unix Domain Socket.
I have 2 applications which should be communicating over a UDS but aren't.
To test I've done the following:
Using socat, I listen on a socket like this:
socat -x -u UNIX-RECV:/tmp/dd.sock STDOUT
and using netcat to send data like this:
echo "hel... |
You have set up a listening datagram socket with socat+UNIX-RECV: and are attempting to talk to it via a stream socket with nc.
The second scenario works because in that case you added the missing -u flag to nc, so that both it and socat were employing a datagram socket. It wasn't anything to do with there being a pr... | Sending data to Unix socket failing unless proxied with socat via UDP |
1,496,166,008,000 |
I want to get the behavior of "nc -z host port ; echo $?" with socat, since my network admins have disabled netcat. The purpose is just to test that a TCP connection is open between two servers. How would I go about doing this?
|
Hi if you want check connection between server with socat try below command and refer link ..
CWsocat [options] <address> <address>
CWsocat -V
CWsocat -h[h[h]] | -?[?[?]]
CWfilan
CWprocan
try this link for better understanding..
there are other method to check the connectivity..
| How to “nc -z <address>” with socat? |
1,496,166,008,000 |
I have the following command line, which should return the value 1 in case of, by means of nc, check communication with the IP and Port in question:
/bin/nc -z 10.102.10.22 10003 > /dev/null && if [ $? -eq 0 ]; then echo 1; else echo 0; fi
The result is satisfactory and I get the value 1. But when there is no communi... |
The && only applies the second part if the first part is true. So what you have is this
nc succeeds, so run the if it suceeded (which it did) echo 1
nc fails, so don't go past the &&
I think what you want is this
if nc -z 10.102.10.22 10003 > /dev/null; then echo 1; else echo 0; fi
| Conditional `if` with command that doesn't respond in else |
1,496,166,008,000 |
I'm learning the Apache Flink. Here is the Hello World of Flink: https://ci.apache.org/projects/flink/flink-docs-stable/getting-started/tutorials/local_setup.html
This example is a program, which counts the words in every 5 seconds.
If we want to run this sample, we need to do the following steps:
Execute nc -l 9000 ... |
Pipe the whole loop into nc:
while true; do
echo 'lol'
sleep 1
done | nc -l 9000
This will start a single instance of nc, listening for connections on port 9000, and send “lol” once per second to it.
Note that “lol”s will accumulate until the connection is opened, so you might see a number of “lol”s send imme... | How to use nc to send message consecutively per second |
1,524,230,922,000 |
I have a Server (Debian) that is serving some folders trough NFS and a Client (Debian) that connects to the NFS Server (With NFSv4) and mounts that exported folder. So far everything is fine, I can connect and modify the content of the folders. But the users are completely messed up. From what I understand this is due... |
There are a couple of things to note when using NFSv4 id mapping on mounts which use the default AUTH_SYS authentication (sec=sys mount option) instead of Kerberos.
NOTE: With AUTH_SYS idmapping only translates the user/group names. Permissions are still checked against local UID/GID values. Only way to get permission... | How to get NFSv4 idmap working with sec=sys? |
1,524,230,922,000 |
In tutorials on NFSv4 it is common to see the recommendation to export a shared root directory to the entire subnet similar to this from the Arch wiki:
/etc/exports:
/srv/nfs 192.168.1.0/24(rw,sync,crossmnt,fsid=0,no_subtree_check)
/srv/nfs/music 192.168.1.0/24(rw,sync,no_subtree_check)
/srv/nfs/public 192.168... |
The man page for exports says about the fsid parameter
NFS needs to be able to identify each filesystem that it exports. Normally it will use a UUID for the filesystem (if the filesystem has such a thing) or the device number of the device holding the filesystem (if the filesystem is stored on the device).
As not all... | implications of using NFSv4 fsid=0 and exporting the NFS root to entire LAN (or not) |
1,524,230,922,000 |
We are using rsync to synchronize data from two NFS servers. One NFS server is on the east coast, the other is on west coast. RTT is about 110ms.
On the east coast NFS server I mount the west coasts NFS server mount point.
<server>:/home/backups on /mnt/backups type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=10485... |
It seems to me you're trying to use rsync wrong. Rsync's protocol is designed for the exact senario of comparing / synchronising large file systems on two separate servers. It does at much as it can locally on both the local and remote machine before comparing in the middle.
Its protocol is designed such that an rsy... | NFS performance over high latency is poor, rsync over ssh is about 100x faster |
1,524,230,922,000 |
updates: 5 (20171209)
updates: 5 (20171210)
mount -t nfs4 [SERVER IP]:/archlinux /mnt works.
ss -ntp | grep 2049 the client establishes a connection to the server before systemd begins.
NSF4 id mapper can only be used with Kerberos?
the problem
I am attempting to set up a diskless node/workstation/system. The OS (4.... |
From the kernel documentation for kernel parameters
nfs.nfs4_disable_idmapping=
[NFSv4] When set to the default of '1', this option ensures that both the RPC level authentication scheme and the NFS level operations agree to use numeric uids/gids if the mount is using the 'sec=sys' security flavour. In effect it is di... | archlinux netboot diskless node/system, systemd on NFS (v4) fails, rpc.idmapd |
1,524,230,922,000 |
I'm trying to mount a simple NFS share, but it keeps saying "operation not permitted".
The NFS server has the following share.
/mnt/share_dir 192.168.7.101(ro,fsid=0,all_squash,async,no_subtree_check) 192.168.7.11(ro,fsid=0,all_squash,async,no_subtree_check)
The share seems to be active for both clients.
# exportfs -... |
I found the issue.
Basically, I've created a Debian unprivileged container in Proxmox.
That means NFS is unavailable. Until now, I was unaware of that restriction while using Proxmox containers.
To be able to access the NFS share within that container, I followed some suggestions from Proxmox forum.
First, I mounted t... | Mount NFS - "operation not permitted" in Proxmox container |
1,524,230,922,000 |
I have an XFS filesystem in which some folders (using mode setting) have no public accessiblity, with group owner having read-only privileges. There is a program (which runs as user cryosparc_user) which needs read access to all the files, so I added a default POSIX ACL granting cryosparc_user read access.
Unfortunat... |
My problem turned out to be a failure to understand how POSIX ACLs work; in particular I assumed that default ACLs set permissions on the directory they've been applied to, when in fact these only apply to subdirectories and files created after the default ACL's have been applied to the parent object and don't in fact... | Why is NFSv4 not translating POSIX ACL's in a usable way? |
1,524,230,922,000 |
I have an NFS mount served from a Linux server to a FreeBSD client. If I use touch to set the atime and mtime of a file on the FreeBSD client,
tavianator@muon $ touch -at "199112140000" ./foo
tavianator@muon $ touch -mt "199112150000" ./foo
then print the stat times,
tavianator@muon $ stat -f $'Access: %Sa\nModify: ... |
From looking at a packet capture in Wireshark, it appears this is a bug in the Linux server, not the FreeBSD client.
I believe this is a bug in Linux kernel commit e377a3e698fb, first included in version 5.18. That commit adds support for reporting TIME_CREATE aka birth time. After that commit, the code that writes ... | NFS mount mixing up ctime and mtime |
1,524,230,922,000 |
in RHEL 8.8 when I am trying to test NFS tcp versus udp and versions 3 versus 4.0, 4.1 and 4.2, I observe on my nfs client a mountproto= in addition to proto= when typing mount. What is the significance of this and what does it mean?
Should I be able to, in RHEL 8.8, have NFS operating showing specifically vers=3 and... |
In older NFS versions (v2 and v3) there are two distinct RPC services handled by separate software: the "MOUNT" protocol that's used only to obtain the initial filesystem handles from rpc.mountd, and the "NFS" protocol that's used for everything else.
So the mountproto= option defines the transport used to access rpc.... | difference NFS proto and mountproto |
1,524,230,922,000 |
RHEL 7.9 x86-64
high end dell servers with Xeon cpu's, 512gb ram, intel nic card
I am the only user on the server(s), and there is no other work load on them
cisco 1gbps wired LAN
data.tar is ~ 50 gb
/bkup is NFS mounted as vers=4.1 and sync
a scp data.tar backupserver:/bkup/ runs at 112 MB/sec consistently; I've see... |
The primary cause is probably the fact that the NFS share is mounted with the sync option. This theoretically improves data safety in scenarios where the server might suddenly disappear or the client might unexpectedly disconnect, but it also hurts performance.
Using the sync mount option is equivalent to the applicat... | why is NFS copy speed half that of SSH scp? |
1,524,230,922,000 |
I have a Debian 10 machine which has a nfs mountpoint specified in fstab.
This is the line
10.0.0.2:/mnt/md0 /mnt/md0 nfs4 _netdev,auto,nofail 0 0
I thought nofail would prevent my boot sequence hanging for (precicely) 1:32 while a time out takes place while the system is looking for the nfs drive. How... |
For automatically mounting NFS when present, autofs can be used (autofs)
As mentioned in man fstab(5)
nofail
do not report errors for this device if it does not exist.
AFAIK nobootwait was only for ubuntu-based distros (which is not a valid option anymore)
You can use x-systemd.device-timeout= (more info systemd.mo... | Debian 10 fstab - Is there an option to prevent boot sequence hanging when device does not exist? |
1,524,230,922,000 |
in RHEL 7.9, samba-4.10.16-19, nfs-utils-1.3.0,
server A and server B both have SELINUX as enforcing
from server A, the folder /data is NFS exported.
on server B, mount A:/data /data successfully mounts as NFS v4.1.
on server B if I samba share out /data which is nfs mounted, it cannot be accessed until I do setenfor... |
regarding samba not working with an NFS mounted folder...
getsebool -a | grep samba
by default samba_share_nfs is off.
doing an setsebool -P samba_share_nfs on
fixes that. The -P is for persistence, otherwise it'll be off again after reboot.
| samba sharing nfs mounted folder and SELINUX |
1,421,509,636,000 |
Suppose I have a native (i.e. coming from manufacturers) windows 7 installation on a laptop (with an SSD device, BIOS/MBR partition table if that matters).
The partition on the device is completely allocated and dedicated to windows.
I now want to install a linux system alongside windows, and to do that I need to firs... |
GParted is often worth using because it helps avoid several nasty mistakes. I guess the main advantage of command-line tools here is to have more visibility of details. This can be useful in unexpectedly fragile situations (at least once it's broken, the details might help you realize why). However I wouldn't recom... | How do I resize a windows partition without using gparted? |
1,421,509,636,000 |
I created an NTFS logical volume on my Linux system for Windows file storage because I want to retain the creation date of my files (I would probably zip them into an archive and then unzip them, though I have no idea if that would work). Does NTFS-3G save the creation date of files on Linux? If so, how do I access it... |
From https://github.com/tuxera/ntfs-3g/wiki/Using-Extended-Attributes#file-times,
An NTFS file is qualified by a set of four time stamps “representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)”, though UTC has not been defined for years before 1961 because of unknown variations of the earth r... | How do I get the creation date of a file on an NTFS logical volume? |
1,421,509,636,000 |
I'm having some doubts about how to install and allow Linux to correctly read/write to a NTFS formatted harddrive used as backup of various machines (windows included, that's how I need NTFS).
For now, I've read some pages and I have the feeling I need someone else's guidance from who already did this step-by-step, to... |
You can use ntfs-3g, but make sure you place the mappings file in the right place. Once you do that you should see file ownerships in ../User/name match the unix user.
However, if you just want to use it as backup you should probably just save a big tarball onto the ntfs location. If you also want random access you c... | Is NTFS under linux able to save a linux file, with its chown and chmod settings? |
1,421,509,636,000 |
For the past 3 days (after an update) my Debian Jessie refuses to mount NTFS disks. I reinstalled libfuse2 and ntfs-3g, yet I get the same Input/output error
I tried the same disks under Windows 7 and OSX Mavericks (using ntfs-3g) and they work fine. I purged ntfs-3g and reinstalled, and still the same problem.
The di... |
It is ntfs-3g bug. Downgrade ntfs-3g and it will work.
I had the same problem with 1:2014 version, and no problem with 1:2012 version (which in "stable" repository)
| ntfs-3g: Input/output error |
1,421,509,636,000 |
After installing ntfs-3g I have an option in nautilus to mount a Windows directory but I need to give root password. While I have no objection to giving root password I would prefer to be restricted to permission of corresponding Windows user (i.e. disallowing modification of system files). Is is easily achievable or ... |
There IS a way to recognize Windows permissions on a ntfs-3g mount. You have to create a user-mapping file. See here.
This can be done from within Linux too, with the ntfs-3g.usermap utility. See the manual pages for mount.ntfs-3g and ntfs-3g.usermap. (I use Fedora 14.)
EDIT: I don't know what effect enabling this wil... | Allowing user to read only parts of NTFS filesystem |
1,421,509,636,000 |
When configuring the kernel I see an option to add read-write support for NTFS. Then when mounting my NTFS partition I still have to install ntfs-3g and pass ntfs-3g as the type. I thought if I add NTFS support in the kernel then I wouldn't have to install a library for it. Why is it so?
|
The kernel driver is still read only and has no full write support yet, only with many restrictions.
| Why do I need ntfs-3g when I have already enabled NTFS support in the kernel? |
1,421,509,636,000 |
I'm trying to mount a Windows ntfs partition on openSuse 11.4. When I mount it using the root account (either directly or via sudo) it mounts without problems. But when I try mounting it without any root privileges, it gives me the following error:
Error opening '/dev/sda2': Permission denied
Failed to mount '/dev/sda... |
The ntfs-3g binaries must be set uid root in order for user mounting to work. And you need permission to the block device & mount point.
sudo chmod 1755 /sbin/mount.ntfs-3g /usr/bin/ntfs-3g
sudo chmod 666 /dev/sda2
sudo chmod 777 /media/Windows
(Note: these are the Debian locations, they may differ for Suse, so you w... | Unable to mount NTFS partition from user account |
1,421,509,636,000 |
I am reading a text (R. W. Smith LPIC_1 study Guide) that says:
Linux can reliably read NTFS and can overwrite existing files, but the
Linux kernel can’t write new files to an NTFS partition.
What does it mean that the "kernel" cannot write new files to an NFTS partition?
In another place it says:
NTFS-3G is a read... |
That there was no proper read/write NTFS support before NTFS-3G. Initially, on a dual boot system, it was possible to write a file on an NTFS partition, but on rebooting, under Windows NT/XP, you would have to do a filesystem check to get the (meta) data on disc corrected. It was therefore common to have a VFAT partit... | How does Linux kernel deal with Windows NTFS filesystem? |
1,421,509,636,000 |
I have ntfs-3g installed, and use this udev rule to auto mount external drives automatically. When I try umount it as non-root, it says:
umount: /media/umm is not in the fstab (and you are not root)
The device mounts as:
/dev/sdc1 fuseblk 150G 143G 6.6G 96% /media/umm
and is part of the users group. I did a c... |
This is how the system is designed.
Since the filesystem is being mounted by root and it's not listed in /etc/fstab with the user option, only root can unmount it. You can't change this behavior.
What you can do is to modify your script to mount it in a location you own as your user. You'll also need to make the block... | umount an external ntfs drive as non-root |
1,421,509,636,000 |
In my first question: How do I get the creation date of a file on an NTFS logical volume, I asked how to get the "Date created" field in NTFS-3G. Now, that I know I can get the "Date created", I have started adding files onto my NTFS-3G partition and would like to set the "Date created" of each file to its "Date modif... |
The system.ntfs_times extended attribute contains 32 bytes that consist of the btime, mtime, atime, ctime as 64bit integers.
You can list them with for instance:
getfattr --only-values -n system.ntfs_times -- "$file" |
perl -MPOSIX -0777 -ne 'print ctime $_/10000000-11644473600 for unpack("Q4",$_)'
So you can just ... | How do I recursively set the date created attribute to the date modified attribute on NTFS-3G? |
1,421,509,636,000 |
Since NTFS is a proprietary file system created by Microsoft, how did the ntfs-3g developers manage to create an open source version of the NTFS drivers without referring to the NTFS source code? Or is there some kind of agreement with Microsoft regarding this??
|
ntfs-3g is the following of the first NTFS driver created back in 1995 by Martin von Löwis.
The driver has been mostly reverse engineered which mean by observing and analyzing the data structure and find a way to correctly handling it.
According to the original project site
The method was roughly:
1 Look at t... | How was ntfs-3g created? |
1,421,509,636,000 |
I have an NTFS partition(/dev/sda3) mounted via ntfs-3g on arch linux.
This partition contains a file called cee431d2730eb5e1697bd57b3bb529 which I want to delete.
ls -la returns the following output
ls: cannot access 'data/cee431d2730eb5e1697bd57b3bb529': Input/output error
total 16611578
#Some other files...
d??????... |
As far I know, currently there is no Linux tool for the fixing of ntfs partitions. ntfsfix is only a trick, it simply sets the partition as "clean", but it actually doesn't clean it.
Writing to a corrupted filesystem endangers the data on it, and we generally don't trust ntfs, thus we try to avoid the further data cor... | How to delete a corrupted file on an NTFS partition? |
1,421,509,636,000 |
I was reading this article - how do I Access or mount windows NTFS partition in Linux that mentions:
NTFS3G is an open source cross-platform, stable, GPL licensed, POSIX, NTFS R/W driver used in Linux. It provides safe handling of Windows NTFS file systems viz create, remove, rename, move files, directories, hard lin... |
The original code in Linux for NTFS partitions could change an NTFS partition, but required you to do a disk check after rebooting into Windows NT.
I am not sure when this was, it might have been those in last millenium with SuSE 4. And not working from a live CD, but from a dual boot machine.
That changed with NTFS... | Does Live Linux CD in general have safe handling of Windows NTFS files |
1,421,509,636,000 |
I see numerous how-to examples for mounting an ntfs partition with either a mount command or an entry in fstab. In all cases, specifying ntfs as the filesystem is associated with also specifying umask=0222, and specifying ntsf-3g never has a umask parameter.
Trying to research umask, I came across numerous explanatio... |
I do not know the difference between ntfs and ntfs-3g.
Regarding the umask option, it specifies a bit mask such that the bits set in the umask are cleared in the file access permissions. These permission bits are RWXRWXRWX, where R is read access, W is write access, and X is execute access, with some higher bits used ... | mount command permissions: ntfs vs. ntfs-3g |
1,421,509,636,000 |
I have two users: userA and userB. I have also NTFS formatted parition. Whole parition is only accessible to userA thanks to this in /etc/fstab:
/dev/sda3 /home/userA/data ntfs-3g defaults,rw,nouser,uid=userA,umask=077,exec 0 0
. I want to allow ONE folder (for example /home/userA/data/movies) to be accessible for us... |
I assume the client machine is running Linux.
Linux has the ability to create multiple views of all or part of the same filesystem. You can use this to make only part of a filesystem accessible to a user (subject to further permission checks).
/dev/sda3 /home/userA/data ntfs-3g defaults,rw,nouser,uid=userA,umask=077,e... | How to allow access to only one NTFS folder of already mounted partition for specific user? |
1,421,509,636,000 |
I'm trying to reduce the size of a backup drive image. Original disk had these partitions:
Model: ST916082 1A (scsi)
Disk /dev/sde: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 65.7GB 65.7GB primary ntfs ... |
If it's just the dump of the partition, there's no partition table. The partition is the file, you just need to shrink the file:
truncate -s 27000832000 datapartition
(27000832000 is 26999992832 rounded up to the next MiB just to be on the safe side, would you like for instance to compress it to a qcow2 format or any... | How do I resize a disk image device? |
1,421,509,636,000 |
Why I cannot change the ownership on mounting ntfs drive?
I give uid=1000,gid=1000, etc in my /etc/fstab file, but found it is not working. So I'm testing it out on command line:
root@host:~# mount | grep /mnt/tmp1 | wc
0 0 0
root@host:~# mount -o uid=1000 /dev/nvme0n1p4 /mnt/tmp1/
root@host:~# mou... |
You're using NTFS-3g, a user-space NTFS filesystem driver.
Between the kernel and any such user-space filesystem drivers, there is an interface layer called FUSE (short of Filesystem in USErspace).
Note that the filesystem type is listed as fuseblk, not as ntfs or ntfs-3g. When you see type fuseblk (some options), the... | Cannot change the ownership mounting ntfs drive |
1,421,509,636,000 |
I want to backup my home directory to an external SSD drive using rsync.
I'm on Arch Linux. My home is ext4 (251G), the SSD is NTFS-3G mounted as fuseblk (512G).
The exact rsync invocation is:
rsync -aSh --info=progress2 --delete --exclude=/me/.cache /home/me /run/media/me/Samsung_T5/
Eventually, it fails with this b... |
You might look at duplicity and its gui deja-dup. It does incremental backups using tar files, optionally encrypted, optionally to a remote server.
It uses librsync and its rolling-checksum algorithm so that each incremental archive holds only the changed parts of files.
The home page says it handles Unix permissions,... | rsync doubles the size when copied from ext4 to NTFS-3G |
1,421,509,636,000 |
Disclaimer: I know there's Raspberry Pi community here, but I don't think it's Pi-specific, more like Raspbian (or Debian?) vs USB HDD vs NTFS, etc.
TL;DR: So, I've got a Raspberry Pi 4 with an external USB HDD. Read/write speeds there are quite low, and the most surprising thing for me is that read is actually slower... |
To answer your first question, 40MB/s sounds like a bottleneck with USB 2.0. The Pi 4 supports USB 3, but ensure your HDD and cable are USB 3.
Updated with information from the comments:
Also note that your rsync involves 2 sides: external HDD and wherever your home is. To remove the second part from the equation try ... | Why is USB HDD slow (reading slower than writing)? |
1,421,509,636,000 |
I just connected my NTFS HDD to my homeserver and I have an odd problem.
EVERY file on the HDD is displayed as an "unsupported reparse point" in ls -lsa
I tried mounting with different permissions and even did an ntfsfix, but no workey...
When i plug the drive into my Windows machine everything works flawlessly, so it... |
Okay. I do not have a solution, but I think I found the cause.
I can still BROWSE my HDD via Windows, but i cannot access any files, because they are reported with 0 bytes on disk. So either my file-system is corrupt, or I just invented the most efficient compression... (I do not think it is the latter ;) )
I do not k... | NTFS-3G: All files are an "unsupported reparse point" |
1,421,509,636,000 |
I am using dircolor-solarized to render my ls output. It works well in my linux partition. However, in a NTFS partition mounted by ntfs-3g, all the files were colored green because /etc/fstab grants the executable permission to the partition:
/dev/sdb5 /mnt/win10_E ntfs-3g rw,uid=1000,gid=1000,dmask=0022,fma... |
As suggested by @jigglynaga, you can get part of what you want using a different mount option.
According to the manual page, these are the relevant options:
umask=value
Set the bitmask of the file and directory permissions that are not present. The value is given in octal. The default value is 0 which means full acce... | dircolor mistakes caused by the permission of ntfs-3g |
1,421,509,636,000 |
I'm trying to execute a script located on an NTFS partition that I own.
I own the mount point, which is ~/Migration.
ls -l in the directory where the mount point is contained shows me
drwxrwxrwx 1 technomage technomage 4096 Sep 30 18:04 Migration
Despite being the owner of the entire structure, from the mount po... |
You have your options right in /etc/fstab, but the order matters; exec has to come after user because user imposes noexec (among others). So your /etc/fstab entry should look like this:
UUID=6F537BB96F6E0CBC /home/technomage/Migration ntfs-3g rw,umask=000,uid=1000,gid=1000,user,exec 0 0
After the change to /etc/fstab... | NTFS Partition Not Mounting Properly, Cannot Execute Despite Ownership |
1,697,791,080,000 |
I need to read and write to an usb ntfs pendrive through www-data group (that has uid 33) so I have added
UUID=34A0456D004536A0 /home/mypath ntfs-3g rw,defaults,uid=1000,gid=33,dmode=770,fmode=660,dmask=007,fmask=117,auto 0 0
the disk is mounted but with generic permissions applied to all USB drivers ignoring everyth... |
Edit udisk2 mount options with:
sudo nano /etc/udisks2/mount_options.conf
and add
[defaults]
ntfs_defaults=uid=$UID,gid=$GID,windows_names
ntfs_allow=uid=$UID,gid=$GID,umask,dmask,fmask,locale,norecover,ignore_case,windows_names,compression,nocompression,big_writes
if still doesn't work:
sudo nano /etc/udev/rules.d/9... | Permissions and groups in fstab ignored |
1,697,791,080,000 |
This is somewhat related to Looking for 4 TB cross-platform filesystem for standalone disk
Currently I am posessing a 2 TB external hdd and sometimes the internal ntfs index gets corrupted hence I have to resort to this -
> sudo ntfsfix -d /dev/sdb1 ... |
In any Linux OS you can check the version of NTFS file system in a drive using
sudo ntfsinfo -m /dev/sdbX | grep Version
Omit grep Version for full details. Replace /dev/sdbX with correct device file. Unmount the device before running the above command.
In Windows use open cmd as an administrator and use the foll... | what is the version of ntfs when an external disk is partioned under MS-Windows 7 |
1,697,791,080,000 |
I have two mounts /mount1 and /mount2. I ran the command:
rsync -azrt /mount1/* /mount2/
to clone everything from /mount1 to /mount2.
I then altered the /etc/fstab (see below) to remove /mount1 and mount /mount2 to /mount1 but things (including my email servers local user folders) are not working properly for permiss... |
Generic FUSE options
1) I noticed allow_other wasn't set on the ntfs-3g filesystem mount. The default for FUSE is not to allow access by other users. mhddfs is a FUSE filesystem and so is ntfs-3g (but see next section).
2) When you use allow_other, you also want to consider permissions checking. The default for FUS... | Migrating mounts with identical permissions not working |
1,697,791,080,000 |
This drive has been working fine for a while, but I recall having had some slight trouble getting it mounted in the past. Anyway, it was disconnected from the machine for some time and when I reconnected it and tried to mount it again with ntfs-3g, I got the following error:
Failed to mount '/dev/sdb1': Input/output e... |
"Input/output error" points to a low-level problem that likely has little to do with the filesystem.
It should show up in dmesg and the output of smartctl -x /dev/sdX may also provide clues.
You can also try to strace -f -s200 ntfs-3g [args] 2>&1 | less to see which syscall hits the i/o error.
The root cause is probab... | NTFS drive not mounting in Debian |
1,697,791,080,000 |
I have a Raspberry Pi (though could be any Debian Linux box) connected to an external hard disk formatted as NTFS.
My disk mount in fstab is:
/dev/sda1 /media/disk ntfs-3g defaults,uid=1000,gid-1000,dmask=007,fmask=007 0 0
where user 1000 is the 'pi' user
/media/disk/shared is my Samba root folder. Must be access... |
Here's my configuration and it works:
[public]
comment = Public Storage
path = /media/hddusb
create mask = 0660
directory mask = 0771
read only = no
guest ok = yes
browseable = yes
| Login fails from Windows on NTFS-3G Samba Share |
1,697,791,080,000 |
I have an NTFS formatted USB hard disk that works fine (mounts and unmounts cleanly) on my windows desktop.
I can't however seem to mount it on my freebsd box at all.
Stripping this back to the basics, I can confirm the box sees the USB device,
pfSense log/ root^> dmesg
ugen1.5: <Seagate> at usbus1
umass1: <Seagate Ex... |
I managed to make it work.
Not sure this did the trick, but here were the steps,
diskinfo -c da1
mount_ntfs-3g -o ro /dev/da1s1 /media/multi-media/
fuse: failed to open fuse device: No such file or directory
vi /etc/rc.conf
# add the following line to the end
# fusefs_enable="YES"
kldload fuse.ko
mount_ntfs-3g -o w... | fdisk: could not detect sector size of USB hard disk on FreeBSD |
1,697,791,080,000 |
I am trying to make a folder and its file read only so I do not accidentally delete it.
I have run
chmod -R 444 myfolder/
but when I then right click on the folderand go Properties>Permissions, it is still showing as read and write. I also tested by modifying a file, and the modification succeeds.
In addition, when ... |
Note
This post was made before OP gave the additional info that he's using a windows filesystem (NTFS) on a linux machine. I was under the impression he's using a native linux filesystem.
You need to set the read, write and executable flag for the owner, and the read, executable flag for the group for mydirectory.
Th... | Setting an NTFS file to be read only from Linux |
1,697,791,080,000 |
I have a dual boot system (Windows 10/Archlinux) and I have created a NFTS partition which is mounted at startup via /etc/fstab so I can access it from both OS'es.
The fstab file shows that the partition is mounted with read and write permissions (rw) with user_id=0 and group=0, both values related to the root user, f... |
As Chris Davies said in the comments section,
the answer is in man ntfs-3g,
in the Access Handling and Security section, to be precise.
I could do ntfs-3g -o uid=1000,gid=1000,umask=700 /dev/nvme0n1p6 /mnt/Contenido/ to get my regular user as the owner.
I don't know if it is worth mentioning, but it is important to re... | Files created by user in a mounted partition show root as owner |
1,697,791,080,000 |
I have two Linux systems: NFSServer1 (RHEL) and NFSClient1 (Ubuntu).
On NFSServer1, ntfs-3g driver and ldmtool is installed. The NTFS device partitions are mounted by executing the command:
mount -t ntfs-3g -o ro,noatime $devPath $mountPath
Note: The two partitions /dev/mapper/ldm_vol_VishalWDD-Dg0_Volume1 and /dev/ma... |
FUSE is a filesystem in userland – due to context switching overhead, it's not ever going to be as fast as an in-kernel file system, and my guess is this hurts even more when you have to do very file-system intense things like a find on it.
So.
Either use the NTFS3 in-kernel driver (as available in Linux 5.15 and on,... | Slow reading of millions of files in Fuseblk partitions shared over NFS |
1,697,791,080,000 |
I regularly update my system running KDE Neon, but this time after the update something broke in the "file copy" process. The system slows down during copying to external hdd or pendrive so much so that the system becomes unusable, CPU usage runs too high. Initially after reading some online forums I thought it was so... |
After a bit of research I noticed the kernel was updated to 5.3 from 5.0, it was certainly due to system updates. After downgrading the kernel to 5.0 all things came back to normal. I dont know whats wrong with version 5.3, but it resulted in very high cpu usage specially mount.ntfs process which is around 60 to 70 pe... | Copying files slows down the system, making it unusable (KDE Neon) |
1,697,791,080,000 |
I have upgraded my macOS from High Sierra to Catalina, which, I think, causes for me to have following error. Is there any way to fix this error?
$ mkdir /Volumes/FOLDER
$ sudo /usr/local/bin/ntfs-3g /dev/disk2s1 /Volumes/FOLDER -olocal -oallow_other -o auto_xattr
$MFTMirr does not match $MFT (record 3).
Failed to... |
I have followed this solution for Ubuntu:
The error you are seeing indicates the filesystem is not clean and
needs checked by Windows chkdsk. There are components to NTFS
filesystem ($MFT and $MFTMirr respectively in this case) which say
what is where on the disk. These files no longer match each other,
which... | NTFS-3G cannot on macOS catalina: MFTMirr does not match $MFT (record 3) |
1,697,791,080,000 |
Been reading the ntfsclone manual but I still can understand and see the point of doing a Metadata-only cloning? What is the point of this, when can it be valuable?
I assume "metadata" is just information about the filesystem objects (e.g. folder and files) but not the objects themself.
|
It could be useful to recover from filesystem corruption.
When you format c:, or delete files by accident, the metadata is what you lose first and without metadata, it's a very difficult process to restore / undelete / recover individual files or entire filesystems.
However, it would be easy if you had a metadata clon... | ntfsclone, metadata-only cloning....why? |
1,697,791,080,000 |
I use for a half and a year Linux with 6 HDD with NTFS format and modify my fstab to can read and write, also I have ntfs-3g installed.
UUID=480a3f32-e304-49b0-b322-4964349fd941 / ext4 rw,relatime,data=ordered 0 1
UUID=BAF0D1D3F0D195CB /media/ntfs/Anime ntfs-3g rw,uid=1000,uma... |
man ntfs-3g
Windows hibernation and fast restarting
On computers which can be dual-booted into Windows or Linux, Windows
has to be fully shut down before booting into Linux, otherwise the NTFS
file systems on internal disks may be left in an inconsistent state and
changes made by Linu... | Unable to mount read an write partitions |
1,478,290,021,000 |
I am trying to use the HDMI output on a PC (HP ZBook) with Debian (stretch). I have configured Bumblebee, it works well (glxinfo and optirun glxinfo report the expected information, and I tested complicated GLSL shaders that also work as expected).
Now I would like to be able to plug a videoprojector on the HDMI. I ha... |
Yes, found out !
To activate VIRTUAL output of the intel driver, you need to create a 20-intel.conf file in the Xorg configuration directory (/usr/share/X11/xorg.conf.d under Debian stretch, found out by reading /var/log/Xorg.0.log)
Section "Device"
Identifier "intelgpu0"
Driver "intel"
Option "VirtualHead... | Do not manage to activate HDMI on a laptop (that has optimus / bumblebee) |
1,478,290,021,000 |
I'm trying to get the optirun command to work with the FOSS Nouveau drivers on my computer that has an embeddded graphics unit and a discrete graphics processing unit. Here's my setup provided by the lspci | egrep -i 'vga|3d'command:
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (r... |
I finally found a solution to my problem by continuing my research.
Solution: do not use Optimus to switch between GPU
The Primus and Optimus programs are made to be used with Nvidia proprietary drivers. It is therefore not recommended to use them with Nouveau drivers. The Linux kernel has tools that allow you to swit... | Nvidia Optimus with Nouveau drivers |
1,478,290,021,000 |
#Solved
It was hardware problem, my motherboard was broken. Fixed now.
#Problem
I can’t figure out how to install Nvidia driver on my laptop.
(I’m being linux user for only 4-5 days, but I think I try hard enough.)
paraduxos@ASUSDOGE:/$ neofetch
_,met$$$$$gg. paraduxos@ASUSDOGE
,g$$$$$$$$$$$$$$$P.... |
I switch to windows 10 and still not detect.
So I turned my laptop to ASUS store.
Turned out, it was hardware problem.
My motherboard was broken.
Now it’s work.
| NVIDIA GTX 1650 not detected on Debian 10 |
1,478,290,021,000 |
I am on Debian Jessie. I just wanted to install Nvidia drivers. But I found nvidia-detect does not detect my dedicated chip. Although it is listed in lshw.
lshw -c video before any installation
# lshw -c video
*-display
description: 3D controller
product: GK107M [GeForce GT 750M]
... |
I think the reason you're having problems is that your video card requires the proprietary nvidia 352 driver and the only driver available in the jessie, jessie-backports, and sid repositores is the version 340 driver. You should check on the Nvidia website drivers page to verify the version your card requires.
The p... | Is my Nvidia dead? |
1,478,290,021,000 |
Whenever i start a 32-bit program aka. 386 with primusrun on debian jessie (be it steam or any of it's 32-bit games), i get a following error:
wv@localhost:~$ primusrun steam
Running Steam on debian 8 64-bit
STEAM_RUNTIME is enabled automatically
Installing breakpad exception handler for appid(steam)/version(143779005... |
Finally i've found the solution. Something's completely wrong with all those multiple libGL.so.1 lib files around the system. So solution for this is performing next commands as root:
apt-get purge bumblebee bumblebee-nvidia primus primus-libs primus-libs:i386
apt-get purge glx-diversions
apt-get purge libgl1-mesa-glx... | Debian jessie, primus and 32-bit applications |
1,478,290,021,000 |
I need to run CUDA enabled applications, but (because of other things) I'd rather use Optimus technology rather than running on Nvidia card only. Note that for CUDA I need to use proprietary binary nvidia drivers.
I followed: https://wiki.debian.org/Bumblebee this tutorial (and setup is mostly working). After reboot ... |
To anyone interested: I have solved this problem by ditching Optimus altogether and just running on proprietary nVidia drivers. Before that I enabled only nVidia card in BIOS).
| Optirun command stops working on Optimus system after some time |
1,478,290,021,000 |
I can't boot my pc because the Xserver doesn't start. What's weird is that when I use SDDM it boots just fine. I also tried to use Lightdm a few months ago but it didn't want to boot, I'm guessing because of this problem.
I've had this problem for like a year but it never really bothered me because I always used SDDM.... |
Added
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
to my ~/.xinitrc file and that made me able to boot with my NVIDIA GPU enabled in BIOS, and without SDDM.
The reason why that wasn't added yet was because when using SDDM I had to add that to /usr/share/sddm/scripts/Xsetup instead of to ~/.xini... | Nvidia Optimus laptop: startX and xinit don't work (Arch) |
1,478,290,021,000 |
I have a Clevo N871EJ1 (Schenker Media 17) laptop here which gives me quite a headache. I tried to install Ubuntu 18.10, Debian Stretch and Debian Buster (Testing) and all locked up during installation or after installation with "CPU stuck" kernel messages. Was easily reproducible by calling lspci on command line whic... |
To answer my own question, I finally found the solution here:
https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-448327665
So the actual problem is that the X Server and lspci freezes the system when encountering an NVidia GPU which is powered off. I guess setting the kernel option pci=noacpi jus... | Using NVidia GPU on Clevo N871EJ1 laptop |
1,478,290,021,000 |
Situation: I have upgraded two Nvidia Optimus laptops from Linux Mint 17.3 to version 18.
Problem: After upgrade, and a fix for Nvidia drivers, I miss the applet in system tray indicating, which graphics card is currently in use.
|
After a while, I found out, it is a separate package called nvidia-prime-applet.
sudo apt-get install nvidia-prime-applet
and enabling it in Applets (one of Mint's configuration application).
| Missing active graphics card indicator |
1,478,290,021,000 |
I thought the Nvidia driver would install itself properly since it offered me Nvidia drivers installation after fresh system installation. It did not go well.
So, how to make Nvidia Optimus work on Kubuntu 15.10 properly?
|
Here is a step-by-step guide for what I did to make Nvidia Optimus work on Kubuntu 15.10 64-bit. Note that I describe the user friendly way because it's meant for all users to be able to do it.
In the Device Manager choose the recommended driver, in my case nvidia-352
If you don't have it already, in Muon Discover fi... | How to make Nvidia Optimus work on Kubuntu 15.10? |
1,478,290,021,000 |
I've installed Void Linux on Xiaomi Redmibook Pro 15 2022.
I'm experiencing the strange graphic issue:
In X11 UI works slow. It's even hard to manipulate mouse cursor: it freezes and gets stuck. But if I start video on youtube or run glxgears everything starts to work normal.
Also in TTY if I hold any button screen is... |
Solved by adding i915.enable_psr=0 kernel parameter.
| Graphical lags on hybrid graphics laptop |
1,478,290,021,000 |
I recently got a new laptop (Thinkpad T480) which has Intel integrated "UHD Graphics 620" and an Nvidia MX150, and I installed Ubuntu 18.04. I installed the nvidia driver alright, and I believe I am using the Nvidia card successfully to run my laptop's display/external monitors.
However, I have a problem displaying 3D... |
I tried again on a fresh install of Ubuntu 18.04 and installed the Nvidia driver before anything else, and that worked (everything seems to be working now). I believe something else I had previously installed (not sure what) was conflicting with some of the files required by my graphics setup.
| Problems displaying 3D content with Nvidia graphics card in Ubuntu 18.04 |
1,479,563,486,000 |
OverlayFS has a workdir option, beside two other directories lowerdir and upperdir, which needs to be an empty directory.
Unfortunately the kernel documentation of overlayfs does not talk much about the purpose of this option.
The "workdir" needs to be an empty directory on the same filesystem as upperdir.
For reado... |
The workdir option is required, and used to prepare files before they
are switched to the overlay destination in an atomic action (the
workdir needs to be on the same filesystem as the upperdir).
Source: http://windsock.io/the-overlay-filesystem/
I would hazard a guess that "the overlay destination" means upperdir.
... | Linux Filesystem Overlay - what is workdir used for? (OverlayFS) |
1,479,563,486,000 |
I have randomly been reading about union file system which enables a user to mount multiple filesystems on top of one another simultaneously.
However, am finding trouble deciding on which one to use(Unionfs vs Aufs vs Overlayfs vs mhddfs) and why as I have not found concrete information on the subject anywhere. I kno... |
Here are some thoughts - I am still learning this and will update this as I go.
How to choose the union filesystem
There are two ways to look at this:
How do the features of each one compare?
For some common use cases, which one should I choose?
I'll compare unionfs / unionfs-fuse / overlayfs / aufs / mergerfs, the ... | Unionfs vs Aufs vs Overlayfs vs mhddfs, which one do I use |
1,479,563,486,000 |
Instead of just mounting tmpfs on /var/log I want to use overlayfs.
/var/log are writable tmpfs, but containing files were there before
tmpfs mount. This old files are not in memory of tmpfs but in lower layer.
only changes are stored in tmpfs, while old and unmodified files
stored on SSD
sometimes it should be poss... |
Managed to make /var/log overlay, it shows SSD log files, and changes. All changes are kept in RAM. Later I'll do syncing, so changes become permanent every hour, by copying upper layer to lower.
#prepare layers
sudo mkdir -p /var/log.tmpfs
sudo mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=512m,mode=0775 tmp... | Mount /var/logs as tmpfs, with help of overlayfs to save changes sometimes |
1,479,563,486,000 |
I'm new to linux. I installed armbian to an sd card and everything works fine. The sd card is 64GB. Then I installed docker.io, docker-compose and portainer, nothing else.
When I check for disk space with lsblk:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 59.5G 0 disk
├─mmcb... |
/dev/mmcblk0p2 is the root filesystem where your Linux distribution is installed.
Where 2.2GB is in use and 55GB is available.
/var/lib/docker/overlay2 directory is the location where Docker stores its images and containers.
Docker uses a copy-on-write file system for the storage, which creates a new layer on top of t... | Remaining disk space on docker overlay filesystem |
1,479,563,486,000 |
I'm trying to set up a PXEboot environment in which the base system (served over NFS to the PXE clients) is read only, and the root filesystem is an overlayfs filesystem with the read-only NFS base system as the lowerdir and a tmpfs as the upper/work dir's.
I edited an AuFS initramfs script to use OverlayFS, and it's ... |
I ran into the exact same problem (trying to do the exact same thing: a read-only base system for a PXE boot environment).
The behavior I'm seeing exactly matches that in this Ubuntu bug report. I cannot write changes to existing files, but I can delete them (but they're preserved in the lower filesystem... with the u... | OverlayFS Seamlessly Edit File in Lower Directory |
1,479,563,486,000 |
I've been trying mount root (/) as overlayfs.
OS is booting over NFS to RAM. I've added a premount script in initrd, which creates the 'work', 'upper' and 'lower' directories.
During the boot process I'm copying the contents of NFS to the 'lower' dir. Overlayfs is being mounted into ${rootmnt} after that.
Finally, ... |
The challenge of mounting root as overlayfs has been solved.
Briefly, the 'lower', 'work' and 'upper' directories should be moved to the 'merge' dir. However, you should consider:
1) There is no need to do something if the 'lower' directory is present as a disk image. Just mounting it. If not, create tmpfs mount poin... | Mount root as overlayfs |
1,479,563,486,000 |
For some test I start Ubuntu Live from USB.
I'm trying to use tail command to show debug log, but it doesn't work.
I also test opening two terminals (t1, t2) with this code:
t1:
touch a
t2:
tail -f a
t1:
for i in `seq 1 10`; do echo $i >> a; sleep 1; done
Nothing in t2! What can be the cause?
|
If it's a case of tail not working at all, then it could be because your liveCD is using the overlayfs filesystem, which has a bug regarding notifications of modified files. You could try to move the log to another filesystem, such as /tmp if the application creating the log has an option to do so.
You could also car... | tail -f produces no output in Ubuntu live CD |
1,479,563,486,000 |
I would clone my partition /dev/sda1 on Ubuntu 14.04.
I've downloaded Clonezilla in order to clone this partition and be able to reinstall it later.
As recommended on the CloneZilla's website, I used Tuxboot to install a CloneZilla iso on my USB key.
I've started my PC from the USB key, it worked and I saw a GRUB-like... |
This probably has to do with the fact that for a ready only mount (which is probably the case for a clonezilla usb key) a workdir is not needed and is left blank in the OverlayFS mount config. Thus the notice is saying that it is missing, but in this case that is nothing to worry about.
You can just go ahead and clone... | overlayfs: missing 'workdir' on CloneZilla start |
1,479,563,486,000 |
I'm trying to determine why a web server running in a Dockerized environment is consuming more memory than I expect it to. While investigating this problem, I discovered the following behavior which doesn't make sense to me:
Create a Docker container, docker run -d --name test ubuntu:22.04 tail -f /dev/null
Check doc... |
This doesn't seem to be filesystem related but a file cache memory thing. To reproduce this exact case I first cloned the Emacs repo to the /usr/src/emacs.
$ docker run --mount type=bind,source=/usr/src/emacs/.git,destination=/mnt/emacs.git,ro -d --rm --name test debian tail -f /dev/null
$ docker exec -it test sh -c '... | Disk space and inodes appear to consume RAM in a Docker container |
1,479,563,486,000 |
I wanted to see what files are added on top of ISO 9660 when LiveUSB Linux is running. When booted with persistence upper and work folders are on USB drive clearly seen. I run mount on Linux booted from LiveUSB "usual way" (w/out persistence) and saw / is mounted via overlayfs and upperdir=/cow/upper. But sudo ls /cow... |
// Experience based on kubuntu 22 lts livecd
after chroot
the last step of ramdisk (/cdrom/casper/initrd) is
run-init {rootmnt}" "${init}" "$@"
which do something like
chroot {rootmnt}" "${init}" "$@"
after that step it may affect the observation of the original mount point.
before chroot
Fortunately there are ways to... | Where is /cow for Linux booted from LiveUSB? |
1,479,563,486,000 |
OverlayFS mount works weird when accessed from within the unprivileged user namespace. Best to be explained in example:
~# uname -a
Linux host 4.1.0-1-amd64 #1 SMP Debian 4.1.3-1 (2015-08-03) x86_64 GNU/Linux
~# runuser - test -c id
uid=2000(test) gid=2000(test) groups=2000(test)
~# cat /etc/subuid /etc/subgid | grep ... |
I think this is because target.work/work on mount belongs to root. Could you try to chown that dir after mount?
However I found simpler reproduction case, we just need dir which is in lower, but not in upper:
# from user
mkdir -p upper lower/test2 target target.work
# from root
mount -t overlay -o lowerdir=lower,upper... | OverlayFS doesn't work with unprivileged user namespace |
1,479,563,486,000 |
I have two directories (a and b), which are NFS shares with files foo.txt and bar.txt:
I want merge this two directories to directory merge (does not have to be writable)
this is possible by command:
sudo mount -t overlay -olowerdir=a:b overlay merge
At first sight everything is ok:
.
├── a
│ └── foo.txt
├── b
│ └... |
What kernel are you using? it seems that a bug was introduced in kernel 4.2:
https://github.com/coreos/rkt/issues/1537
| Merge two NFS shares with OverlayFS |
1,479,563,486,000 |
Run the following commands on linux (4.4.59 and 4.9.8 are tested) and it will fail:
mkdir -p /tmp/proc
mount -t overlay overlay -o lowerdir=/proc:/tmp/proc /tmp/proc
and there is a error message in dmesg:
overlayfs: maximum fs stacking depth exceeded
Why can't /proc be a layer of a overlay file system?
If I replace ... | ERROR: type should be string, got "\nhttps://github.com/torvalds/linux/commit/e54ad7f1ee263ffa5a2de9c609d58dfa27b21cd9\n /*\n * procfs isn't actually a stacking filesystem; however, there is\n * too much magic going on inside it to permit stacking things on\n * top of it\n */\ns->s_stack_depth = FILESYSTEM_MAX_STACK_DEPTH;\n\nThis might not be a very informative answer, but the kernel developers specifically don't support it.\n" | Why can't /proc be a layer of a overlay file system (overlayfs) on linux? |
1,479,563,486,000 |
When I run podman with --storage-opt ignore_chown_errors=true I am getting
Error: kernel does not support overlay fs: 'overlay' is not supported over extfs at /home/user/.local/share/containers/storage/overlay: backing file system is unsupported for this graph driver
|
This is because on Debian you do not have a kernel driver for overlayfs: so you'll need to use a userspace filesystem driver for overlayfs. First make sure it's installed,
sudo apt install fuse-overlayfs
Then add this argument to podman (NOT podman run),
--storage-opt mount_program=/usr/bin/fuse-overlayfs
In your ca... | Error: kernel does not support overlay fs: 'overlay' is not supported over extfs |
1,479,563,486,000 |
I'm trying to learn about docker and the overlayFS, as suggest by the official website, I installed the last kernel:
4.8.11-1.el7.elrepo.x86_64
and as suggest by them to ensure that overlay is good to go, I used:
$ lsmod | grep overlay
But no success, it is because I don't have any FS or directory that is mounted ... |
enable the kernel module with
modprobe overlay
alternatively add overlay to systemd :
echo "overlay" > /etc/modules-load.d/overlay.conf
and restart
| Docker and OverlayFS |
1,479,563,486,000 |
I have an embedded device running BusyBox, there are a number of directories mounted with overlayfs with work and data directories mounted on separate UBI partitions using the following style of command.
The main root filesystem is a squashfs read only image that's been updated with a newer version. I need to delete ... |
The folders in /mnt/config/.data and /mnt/config/.work contain your changes. You can move them out of the way to create new ones. Unmount the overlay and remount it with a clean upper dir:
umount /etc
mv /mnt/config/.data /mnt/config/.data.old
mv /mnt/config/.work /mnt/config/.work.old
mkdir /mnt/config/.data
mkdir /m... | How can I delete changes from an overlay fs? |
1,479,563,486,000 |
I have a linux with a read only root filesystem and a read-write overlayfs mounted over it:
# mount
overlayfs on / type overlayfs (rw,relatime,lowerdir=/root_ro/,upperdir=/root_rw/)
...
The overlayfs is almost full
# df
Filesystem 1K-blocks Used Available Use% Mounted on
overlayfs 4003548... |
There isn't really a notion of “what occupies the space” in an overlay filesystem. Each branch of the union has its own space occupation. Run du on both branches. If it's getting more full, the read-write branch is the culprit.
Since the overlay mount shadows its branches (/root_ro and /root_rw are hidden by the mount... | What occupies space in overlayfs |
1,479,563,486,000 |
I am getting Out of Memory errors while my swap isn't touched. I have 4GB of ram and 4GB of swap space. I enabled the swap via swapon and when doing free, I see the swap listed there.
I'm thinking that perhaps there is some issue with overlayfs / tmpfs and swap all working together. I have always had the opposite p... |
This was a bug with the version of the kernel I was using.
| linux - OOM / swap not being used |
1,479,563,486,000 |
I have downloaded several git repositories arranged in different source trees:
repoDirs1 (with child dirs including vendor)
repoDirs2 (with child dirs including vendor)
specialRepos1
specialRepos2
To get a workable source tree, I have to do as following:
1. cp -rp repoDirs2/* repoDirs1/
2. cp -rp specialRepos1/vendo... |
Future readers be careful: This question is asking to coalesce two directories containing a lot of sub-directories. This should not be used for normal git operations. For that you should generally try to use the .gitignore file or git submodules.
If you want to combine two directories into one place, even where th... | How to use overlay mount to combine multiple directories with different sub directories? |
1,479,563,486,000 |
I am trying to use read-only overlayfs(no workdir and upperdir) inside custom initrd.
This works fine in completely booted OS:
mkdir /tmp/ovl1 /tmp/ovl2 /tmp/merged
mount -t overlay none -o lowerdir=/tmp/ovl1:/tmp/ovl2 /tmp/merged
This also works if I use busybox sh as shell, which has built-in mount command.
Inside ... |
I was sure, that module is statically compiled in kernel, but I was wrong: CONFIG_OVERLAY_FS=m.
After adding the overlay module to initrd everything works fine.
| Can not mount overlayfs inside initrd |
1,479,563,486,000 |
To mount overlay it is given lowerdir, upperdir and workdir as options on mount(8) or data on mount(2), what logic is applied in order to escape commas? I have tried double commas and even quoting with no success.
There is two workaround I found that is not exactly what I want:
Relative path: as far as the last compo... |
Backslash will escape it. Since the mount command sends it as-is (as can be seen with strace), this has to be the kernel which uses a backslash to escape it.
mount -t overlay \
-o 'lowerdir=/tmp/a\,b/lower,upperdir=/tmp/a\,b/upper,workdir=/tmp/a\,b/work' \
overlay '/tmp/a,b/merged'
I think the kernel's escapes in... | How to escape comma on mount options for overlay |
1,479,563,486,000 |
I would like to create a new writable overlay from within a docker container. As the root filesystem in docker is already an overlay, it can't be used as the upperdir of another overlay. This answer suggests using tmpfs for the upperdir, and this works for me. However, I need to write more data than will fit in RAM, a... |
Creating a writable overlay like this is inside of docker can be quite tricky.
One option you have is to use a volume or bind mount into the container. Inside the container these will not be an overlay so their respective directory can be used as an upper. That of course has a trip hazard if accidentally sharing the v... | Create a writeable overlay from inside docker, without using tmpfs? |
1,648,570,654,000 |
I have 2 directories:
/home/mvanorder
/mnt/data/home/mvanorder
I have multiple distros on my computer that I periodically rotate out and install new ones. However for convenience all files that are shared are in /mnt/data/home/mvanorder and then symlinks are created in /home/mvanorder to point to them.
Does anyone ... |
What you describe can not be done using bind mounts or links. However, you can use overlayfs.
An overlayfs mount will show "a merged filesystem" containing files and directories from both. The upper filesystem takes precedence over the lower filesystem. If file exists in both, the upper filesystem version will be visi... | Mount bind or link 2 dirctories into 1 |
1,648,570,654,000 |
I need to keep one system as much intact as possible. Only soldering of HW stuff is allowed :-). I need to install a test software package and this package must not stay there in the future.
I have a following situation:
mmcblck partition mounted as /, ext4, read only, kernel v4.6.0
usb stick (only one partition), mo... |
I tried to chroot to the merged directory. The result was just as expected: I had rw rootfs, the only thing I missed was virtual kernel filesystems. So after mounting the overlay I did the following:
TARGETDIR="/tmp/usbstick/merged"
mount -t proc proc $TARGETDIR/proc
mount -t sysfs sysfs $TARGETDIR/sys
mount -t devtmp... | OverlayFS over read only rootfs fail |
1,648,570,654,000 |
Usecase:
I have a lot of production data and copying it for dev purposes would be unreal. I was thinking that OverlayFS could be a solution until a problem with permissions arised.
Let's assume i have following folder structure:
/data/prod - production data (files+subfolders) owned by prod:prod having 664
/data/prod-... |
Finally found the answer for my question. 🎉
The solution is to use overlayfs in combination with bindfs that allows mount one folder as another folder with different perms/owner/etc.
# sudo bindfs --map=origOwner/newOwner:@origGroup/@newGroup /srcFolder /dstMountpoint
mkdir /data/prod-overlay/dev1/prod # mountpoi... | OverlayFS - Is it possible to make overlay layer writable by anyone/specific user (different than original owner)? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.