date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,682,801,791,000
I have following disk structure: sda1 : Windows sda2 : an old Linux distribution sda3 : a new Linux distribution sda4 : data partition I have grub installed and I choose the system at boot time. I have now been using new Linux distribution only on sda3 and it is working all right. I had been tinkering a little with s...
/etc/fstab does not directly control which filesystem is mounted as root. (Which makes sense. You have to mount a root filesystem before you can read /etc/fstab.) The root filesystem is typically specified in the kernel command line parameters. If you run cat /proc/cmdline to inspect them, you'll probably see root=...
System booting all right despite wrong root entry in /etc/fstab
1,682,801,791,000
I originally had a Linux swap partition on my computer, which I have removed. When I then tried to boot, I would get the error ERROR: resmue: hibernation device 'UUID=f5eea.....andsoon' not found which referred to the missing swap partition. So I commented out the line with the corresponding UUID (and which said "swa...
The device is most propably referenced in a kernel-parameter for your bootloader. So you propably have to update either the bootloader-info or manually remove that reference from your boot-configuration. This is where Linux distributions differ a lot. Ubuntu/Debian ist different. So are systems using grub (like SLES 1...
"Hibernation device not found", although I have updated /etc/fstab
1,682,801,791,000
Here's the problem: I wanted to create a file share between my laptop and my pc at home so that I have access to my files from both machines. The laptop is the server (as I might need the files when on the move) and the pc is the client. Here's my attempt at a solution: having linux (debian) on both machines, I decide...
The server shouldn't care if the client is reachable or not. It's just making a share available... whether it's used or not. The error you are getting "exportfs: failed to resolve pc", isn't saying it can't "reach" pc. It's saying it cant "resolve" pc. The problem is that you are referencing a specific client by ho...
Set up file share with automatic mount using NFS
1,682,801,791,000
I have tried using 3 different identifiers to mount my partition at /dev/sdb1 to /mnt/drive2, but every time I boot it doesn't seem to work and I have to mount it manually. I am connected remotely so I don't know console output during the boot process. It is a GPT drive and has only one partition of type ext4. Here's...
please do mount -a and if there is any error it will be printed to terminal. Also by doing dmesg | grep "sd[a-z]" and dmesg | grep "mount" you can investigate mount errors during boot after booting your linux.
gpt ext4 /etc/fstab doesn't work [closed]
1,682,801,791,000
I have a cifs fileshare that I use. My organisation requires that it uses Kerberos so it's mounted with sec=krb5. This is fine, but I'd like it to mount after login automatically without having to click on the icon on Nautilus. I can create a .desktop entry to .config/autostart/ but it seems a bit clunky. I was hoping...
This is what works for me in Ubuntu 18.04: I added an fstab entry for the fileshare directory on the file server: //server.my.domain.name/directory /mount/point cifs noauto,users,_netdev,sec=krb5 Then I created a shell script with the file extension .sh in /etc/profile.d to mount the directory on login, bu...
mount in fstab with krb5 at login
1,565,291,835,000
I know that a lot of questions have already been asked about emergency mode when booting a Linux distro. (Seemingly Mint, Ubuntu, Redhat all have it.) Does it have documentation? What entity does it belong to (i.e. the Linux kernel, the distribution, the library)? I am just trying to orient myself, and all the inform...
The most common "Emergency mode" is the one entered by your boot system (e.g. GRUB or the next stage, systemd) when the system cannot set up all the hardware it is supposed to set up (e.g. no matching graphics driver for the hardware, partition missing / cannot mount everything in /etc/fstab) etc. The way to deal with...
How can I find the documentation for "emergency mode" when attempting to boot into Linux (Mint in my case)?
1,565,291,835,000
Every single command I run gives me permission denied as root, this happened shortly after I changed /etc/fstab and remounted ext4. The only commands I appear to be able to run is echo and cd, not that it is much help, all others I have tried show the following: bash: /bin/ls: Permission denied bash: /bin/bash: Permis...
echo and cd are shell builtin commands, which is why they still "run". To fix fstab, run the command while read x; do echo "$x"; done < /etc/fstab which will display the contents of /etc/fstab, then run while read x; do echo "$x"; done > /etc/fstab which will clobber /etc/fstab (a very bad thing) but will allow you ...
Linux permission denied
1,565,291,835,000
I use my computer with Debian 9 for Java Spark development. Spark is a Big Data API and these kind of works use more temporary space than the 2G that by default the Debian installation sat. marc@bouleau:/data$ df -h Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur udev 15G 0 15G 0% /dev tm...
On Linux you cannot change partitions on a drive that is mounted. You will need to boot from a live usb [1], and first make more space by making /swap smaller from the end point (it looks too big anyway unless you have more than 15 Gb of ram). Otherwise make /home smaller from the start. You can then expand /tmp into ...
I would like to resize my /tmp partition but gparted doesn't want to change anything, nowhere
1,565,291,835,000
I have a partition structure as follows: /dev/sdc1 => Partition 1 ( My OS. [ Linux flavour ] ) /dev/sdc2 => Partition 2 ( This contents some data. ) /dev/sdc3 => Partition 3 ( This also contents some data. ) /dev/sdc4 => Partition 4 ( I want this as a deciding partition. ) I am trying to mount partition 2 or partitio...
The solution should be systemd-based, you do NOT have to edit /etc/fstab with systemd, why would you ? You just mount the partition, depending on the factors you have outlined, and leave it at that. I do not understand why you would want to edit /etc/fstab if systemd can mount what you need. Do note that systemd will ...
Can fstab dynamically mount a partition by reading from a file or filename?
1,565,291,835,000
we create the following mount point and nfsshare folder as share folder on all our linux client machines ( total 1872 machines - redhat 7.2 ) master1:/nfs 41932800 6563840 35368960 16% /nfsshare I just thinking about if from some reason by mistake someone of our users decided by mistake to perform umoun...
As you're using RHEL 7.x, you could use a systemd .automount unit. Just make an entry like this in /etc/fstab: master1:/nfs /nfsshare nfs defaults,noauto,x-systemd.automount 0 0 mount option noauto disables classic-style mounting at boot time mount option x-systemd.automount causes systemd-fstab-generator to create ...
is it possible mount automatically if from some reason mount folder isn't mounted
1,565,291,835,000
System: Linux Mint 19.1 Cinnamon. Disks in this question are considered external HDDs either ext4 or ntfs formatted. I am interested in how do I manage to set my fstab or whatever else to be able to Unmount (umount) those external HDDs under my normal user account? I have: one External hard disk over USB 3.0 formatt...
You need to add users option to your fstab entries. Working example on my setup: UUID=<the UUID of the Ext4 disk drive> /mnt/external-hdd-2tb-usb3-ext4 ext4 nosuid,nodev,nofail,users 0 0 UUID=<the UUID of the NTFS disk drive> /mnt/external-hdd-500gb-usb2-ntfs ntfs nosuid,nodev,nofail,users ...
How to set fstab to be able to umount my external HDDs under normal user account?
1,565,291,835,000
I follow a tutorial to secure my /etc/fstab file. This is a certain part about /var and /tmp UUID=XXXX-XXXX-XXXX /var ext4 defaults,nodev,nosuid,noexec 1 2 UUID=ZZZZ-ZZZZ-ZZZZ /tmp ext4 defaults,nodev,nosuid,noexec 1 2 I executed the following commands to test the configuration : touch /tmp/testFile chmod u+s /tmp/te...
nosuid doesn’t prevent setting the bits; it means that they don’t have any effect. (That way, previously-set bits are also rendered ineffective.) Setting the bits is only dangerous if the file system is later mounted without nosuid; but if anyone has sufficient access to set those bits on your file system, you’ve lost...
nosuid doesn't prevent chmod u+s
1,565,291,835,000
I have mounted a ramdrive via /etc/fstab. And I would like to inspect the properties of the drive such as the memory policy (e.g. bind, prefer, or?) to make sure all properties are expected. How can I do so? Thanks!
Executing mount without any arguments gives a list of mounted filesystems, including tmpfs, and their properties: tmpfs on /mountpoint type tmpfs (rw,relatime)
Inspect a Ramdrive?
1,565,291,835,000
We have a Raspberry Pi located at a location where it may experience frequent power loss. I'm trying to make it scan, and repair (if necessary) a filesystem every time it boots up, in case the power loss causes FS corruption. The filesystem in question is ext4, but it is NOT the root filesystem. It seems that I can do...
You don't need to set "-c 1" on the filesystem. That means "force a full e2fsck run each mount", which would both be annoying (slow boot time), and unnecessary for ext4 with a journal. Even without a journal you don't strictly need to run a full e2fsck if the filesystem has been cleanly unmounted (it will record this ...
Does a filesystem check initiated from /etc/fstab auto-repair?
1,565,291,835,000
I have an external USB drive which is formatted in FAT32. That's the output of the fdisk -l command: /dev/sdb1 * 56 15728639 15728584 7.5G c W95 FAT32 (LBA) I have the following entry in my /etc/fstab: UUID=FAF0-4AE6 /media/usb vfat defaults,auto,rw,users,nofail,x-systemd.automount,x-s...
Vfat partitions don't support file owners/groups. Thus, the Linux kernel has to fake it. By default, it makes root:root own everything. To change this, add uid=youruser,gid=yourgroup to the mount options. Then, that user and group will own everything instead.
“cp: cannot create regular file” on a VFAT formatted external USB flash drive
1,565,291,835,000
This one is a bit weird. We have a closed network of about five (5) Red Hat Workstation 7 assets in one of our development laboratories. One of the REHL 7 machines is hosting a USB connected DroboPro via NFS to the other machines - the other machines are mounting this share on boot via /etc/fstab. Everything works gre...
give this a try: add the following flags to your nfs mount point in /etc/fstab: bg,intr,soft,timeo=3,retrans=3,actimeo=3,retry=3 adjust timeout rates accordingly but i found this combination works the best. Ensure "default" is not set in nfs mount point line and read the man pages for nfs to see exactly how this woul...
NFS Share Locking Workstations in Closed Network
1,565,291,835,000
I have a raid10 btrfs volume. When I mount it by UUID, the mount fails and I am booted into emergency mode. When I mount it by drive letter (/dev/sdb/) the server boots fine. Why does this happen? fstab: /dev/sda2 /boot vfat defaults,noatime 0 2 /dev/sda3 / btrfs ...
You have the syntax wrong. It should be : UUID=e1ee5980-c54b-4b6e-82e2-3dbdcee1dd24 /mnt/store btrfs noatime 0 0
/etc/fstab mount fails when mounted by UUID
1,565,291,835,000
we have a lot of linux working machines all mount point are configured in the /etc/fstab as the following: /dev/sdc /grd/sdc ext4 defaults,noatime 0 0 /dev/sdd /grd/sdd ext4 defaults,noatime 0 0 /dev/sdb /grd/sdb ext4 defaults,noatime 0 0 /dev/sde /grd/sde ext4 defaults,noatime 0 0 /dev/sdf /grd/sdf ext4 defaults,noa...
There shouldn't be any issues. If you do changes to your machine configuration (for example add or replace disks) the device names (/dev/sdX) might change at next boot. Using UUIDs avoids this issue. Since you use device names to name the mount points (/grd/sdX), those might not match the device name anymore should th...
reconfigure the fstab file with UUID
1,565,291,835,000
I wanted to put the mounting of my external USB storage disk into /etc/fstab so that I have it mounted READ/ONLY. LABEL=PN /PN ext3 defaults,ro 1 3 My attempt at doing this causes the system to stop at the point in the boot process where the disks are being fsck'd as it appare...
Quick & dirty, omit the filesystem checking of the USB drive (changing the 3 to a 0): LABEL=PN /PN ext3 defaults,ro 1 0 If/when you want to manually fsck the drive, unmount it.
RHEL6 / Centos 6 -- mounting external USB storage at boot time in /etc/fstab
1,565,291,835,000
I managed to run ownCloud on my RaspberryPi 2 on Raspbian. Now I am trying to move the data directory to my NAS. I already shared a folder on my NAS with CIFS and mounted the folder. This allows me to access the shared directory via the command line and manipulate entries. So that works. However, when opening ownCloud...
It sounds like your NAS supports unix extensions that are overriding your mount settings. The man page for mount.cifs notes that dir_mode, file_mode, uid and gid can be overridden by the server if it supports unix extensions (very likely if it is a Linux based NAS). If this is the case you might be able to change the ...
Cannot access mounted shared NAS directory with ownCloud
1,565,291,835,000
I want to comment certain lines in fstab using sed command. The following are the lines I need to comment: 172.0.0.1:/export/project/common /nfs/share nfs4 rw,bg,hard,nointr,rsize=131072,wsize=131072,proto=tcp 172.0.0.1:/export/project/share1 /nfs/shares1 nfs4 rw,bg,hard,nointr,rsize=131072,wsize=131072,proto=tcp I t...
Try this, sed -e '/[/]/common s/^/#/' /etc/fstab sed -e '/[/]/share1 s/^/#/' /etc/fstab Specifying this /[/]common/ will select only lines that contain /common. If this works then replace -e with -i for executing the changing into the file. You can do this with awk awk '/[/]common/{$0="#"$0} 1' /etc/fstab >/etc/fstab...
How do I comment lines in fstab using sed?
1,565,291,835,000
I am trying to setup a fully bootable Arch backup by following: rsync - As a backup utility. I am having a little trouble understanding the example "Update the fstab". Assume we are using UUIDs and not /dev/sdaXX style fstab files. Let X-num be the UUID of the original FS partitions (num as a placeholder for partition...
Yes, you would replace the UUIDs as you think. The backup filesystems all have unique UUIDs, just as the active ones do, so the entries you have in the bootable backup will all be unique. The article you reference presents a simplified example, with expanding it to multiple fstab entries "left as an exercise for the r...
Arch linux; changing fstab for bootable backups
1,565,291,835,000
I have run into a problem with auto mounting nfs exports on a RHEL 6 server. To give you a brief configuration and what I have tried, I’m mounting 6 NFS exported shares from the network. Unfortunately none of the mounts in fstab come up. The mount directories exist, and are in the fstab file. I have verified that nf...
It turns out that the init script for netfs has the following: [ -f /etc/sysconfig/network ] || exit 0 That file did not exist in my RHEL 6 install, possibly because it was a very minimal install, I'm not sure. Regardless, looking at another machine, I created the file with the following: NETWORKING=yes HOSTNAME=loca...
NFS mounts in fstab are not mounted during startup on RHEL
1,565,291,835,000
I have 4 drives on my home server. 3 external drives mounted in fstab to three individual directories in /media. The fourth drive contains a headless debian os install. I want to mount a directory in my home folder on the os drive to a directory in /media, to get easier access to the drives storage space. Am I looking...
ln -s /home /media/volume Much safer option security-wise. Won't accidentally overwrite or delete important system files, for instance.
Best practice to mount directory in /home to directory in /media?
1,565,291,835,000
Task: "You have to configure the /home's filesystem-mounting-method in such a way, so that all I/O operations will be always done in a synchronic mode, without the possibility of using the SUID authorisation. The mount options' changes must be done so that they would still remain in place after rebooting. Then you hav...
Usually mount will print an error if there is one, otherwise it prints nothing. However if you type the mount command without any options it will print out a description of all mounted filesystems, including the mount options. Alternatively, you could try creating a setuid binary: [root@xxxlin01 jad87]# cp /usr/bin/p...
Several specific configurations to the file system
1,565,291,835,000
I was taking truability test to assess my skills. I got the below question. Create a puppet manifest in /root/puppet/lad.pp to mount the filesystem located in /root/files/LAD/disk.ext2 that: will mount the device at "/mnt/LAD" sets fstab to prevent the filesystem from being fsck'd and will prevent dump from running ...
Try changing options => "-o loop", to options => "loop", The error shows mount -o -o loop so you'd want to get rid of one of the -o arguments
puppet mount a loopback device
1,565,291,835,000
I store my data on a NTFS parition to share it with my Windows. I use the dmask,fmask option in my fstab entry to avoid rwx default permissions to everyone, for coherence, security, and also because my zsh color profile rendering is then ugly when listing. /dev/sda5 /mnt/Data auto defaults,force,rw,uid=...
uid gid dmask fmask is mount's way of letting you specify owner, group and access permissions. Either you use it and accept the limitations, or you don't. There are a few options: Skip dmask fmask and adjust your zsh color profile. This seems like the easiest option. Keep your mount options and write a sudo-like scri...
How to automatically set permission at automount without mask
1,565,291,835,000
Problem Overview I recently upgraded my remote server contract with IONOS, increasing my hard drive space from 8GB to 80GB. I have an Ubuntu OS running bash. I then went about extending my working partition, following a tutorial here: https://www.ryadel.com/en/resize-extend-disk-partition-unallocated-disk-space-linux-...
You should examine the LVM VG metadata backup file /etc/lvm/backup/vg00 and find the original PV UUID of /dev/sda2 from there. It is a text file, and the PV UUID should be in a location like this: ([...] indicates some lines omitted for brevity) [...] vg00 { [...] physical_volumes { pv0 { ...
Reboot into `initramfs` after altering partition table
1,565,291,835,000
After I upgraded from Linux Mint 21.1 to 21.2 the newest initrd stopped working. The older one works fine. Regenerating the initrd doesn't help. On startup with the newest initrd the error tells that the UUID of my decrypted Rootdrive does not exist, so I am guessing that the crypttab doesn't get used. I checked the c...
If your root filesystem is encrypted, in modern Debian/Ubuntu/Mint you will need not only the cryptsetup package, but also the cryptsetup-initramfs package. After the upgrade, your /var/cache/apt/archives/ was most likely full of downloaded packages, and so it might have happened that the system is running out of disk...
crypttab seems to not been active
1,693,563,556,000
The fstab is a link to the next fstab file: # <file system> <mount pt> <type> <options> <dump> <pass> /dev/root / ext2 ro,noauto 0 1 proc /proc proc defaults 0 0 /dev/mmcblk0p10 /data ext4 defaults 0 0 overlay / overlay lowerdir=/,upperdir=...
First, you need to understand what happens in the second try. # <file system> <mount pt> <type> <options> <dump> <pass> overlay /data/rfs_overlay overlay lowerdir=/,upperdir=/data/rfs_overlay_upper,workdir=/data/rfs_overlay_work 0 0 Your lowerdir it /. The lowerdir is supposed to be static and shou...
Chagnes done to the rootfs do not redirect to the overlay set in fstab
1,693,563,556,000
//192.168.1.64/d /media/d cifs credentials=/home/nick/.smbcredentials,uid=nick,gid=media,file_mode=0777,dir_mode=0777,nofail,user 0 0 Here's my ls- l of the share once mounted: drwxrwxrwx 2 nick media 0 Jan 20 2023 Blurays2 drwxrwxrwx 2 nick media 0 Jul 26 18:37 cache drwxrwxrwx 2 nick media 0 Feb 5 2021 'Childr...
You need to make sure that /media/nick/Backup Drive is accessible by your target users share and nick. Provided noone else is using the server directly you can choose to relax the filesystem permissions entirely and leave Samba to manage access control: chmod a=rwx '/media/nick/Backup Drive'
Permission Denied CIFS. Tried everything I can think of
1,693,563,556,000
I have bought a new hard drive and moved my home there. I have followed this link: https://www.howtogeek.com/442101/how-to-move-your-linux-home-directory-to-another-hard-drive/. But the new hard drive keeps unmounting during restart and I always have to run mount -a command. I can't remove the old /home entry from /e...
There was a permission issue. I have reset the security label on the home partition mount point and its directories. After su: restorecon -v /home /home/*
Newly created home in a secondary hard drive keeps unmounting after restart, fstab does not work [closed]
1,693,563,556,000
I changed my /etc/fstab from: UUID=f1fc7345-be7a-4c6b-9559-fc6e2d445bfa / ext4 errors=remount-ro 0 1 UUID=4966-E925 /boot/efi vfat umask=0077 0 1 to this: UUID=f1fc7345-be7a-4c6b-9559-fc6e2d445bfa / ext4 data=jou...
TTYs have insanely fast keyboard set by default. I tried to log in about 30 times before the final success. If you have numbers in your password or login name, you may want to turn the numlock on. Issue this command, but make sure you use your drive and partition number: sudo mount -o data=ordered,remount,rw /dev/n...
Fstab adding data=journal crashed my Linux' ext4 upon boot, how to fix?
1,693,563,556,000
When I use this fstab syntax: # grep raven /etc/fstab \\raven.example.com\raven /raven cifs vers=2.0,credentials=/root/creds_smb_raven,\ uid=5000,gid=6000,file_mode=0664,dir_mode=0775 0 0 and reboot, the auto-mount fails, even though a manual re-try succeeds. I see: # mount -t cifs #...
As noted in the comments, use forward slashes instead of backslashes: //raven.example.com/raven /raven cifs vers=2.0,credentials=/root/creds_smb_raven,\ uid=5000,gid=6000,file_mode=0664,dir_mode=0775 0 0
/etc/fstab syntax incompatible between auto-mount and manual mount of CIFS
1,693,563,556,000
I created a partition called sdb1 in fat32 and created 3 folders within a main folder however I wanted the 3 folders to have different permissions. I tried to make an ana folder with all permissions, the marco with permissions for the user and group to execute and the opencloud with permissions for everything but the ...
First, you are using the FAT32 filesystem, which does not support Unix-style file ownerships and permissions. But because Unix-like operating systems assume that all files must have an owner, group and permissions, the vfat filesystem driver fakes it - by assigning all files and all directories in the filesystem the s...
Fstab permissions
1,693,563,556,000
I'm trying to mount an external usb drive to raspberry pi 4b with debian 11 bullseye. Whatever I've tried so far to set mount options gets ignored. /etc/fstab UUID="9f32de87-6800-4585-a5c5-e6a3946ba2bb" /data ext4 defaults,nofail 0 0 UUID="9f32de87-6800-4585-a5c5-e6a3946ba2bb" /data ext4 rw,suid,dev,exec,auto,nouser,a...
async, suid, dev and exec are the default states for an ext4 mount, so only the non-default options (sync, nosuid, nodev and/or noexec) may be displayed. auto and nouser affect mainly the mount command itself, and these are also the default states for these options. Normally all /etc/fstab entries that are not specifi...
mount options ignored - debian 11 bullseye on raspberry with ext. usb drive
1,693,563,556,000
I am trying to mount a hard drive with an NTFS filesystem on it on boot. It doesn't need a special location. /mnt/ or something similar should be enough. I had already done that with a drive but it is way back and i can't remember how I did it. Also I am too scared to just go dive into the fstab file. I am on the late...
I recommend reading the fstab article on Arch Wiki, it's very good, but you don't really need that much, if your NTFS partition is /dev/sda1 all you need to add is this line /dev/sda1 /mnt/<name> ntfs defaults 0 0 you don't really anything more that that. You can also configure fstab from GUI using GNOME Disks...
Mounting NTFS hard drive on boot
1,693,563,556,000
I've been following a set of steps very similar to the ones mentioned on the ArchWiki installation guide. I've recently started playing around with BTRFS snapshots, particularly of the / subvolume. During installation, my mount command looks something like this: mount -o noatime,nodiratime,compress=lzo,space_cache,sub...
As mentioned in this comment on Reddit, subvolid can be safely removed to make the references consistent.
Do contradicting BTRFS subvolid's not cause trouble?
1,693,563,556,000
I have a 35G mount as my root file system, and until now, it was reporting 1% usage. I was using an SD card for my storage and today I got a new one. I'm mounting my /swap partition on that, so I decided to partition the new one with a swap and a "normal" one. First I created an NTFS partition in case I want to use th...
Turns out during my mounting/umounting/rebooting etc., something happened. I was mounting the SD card on /media, and I'm not sure why, but when I finished with the SD card setup, apparently the /media was created as a directory and not a mount, so it was that directory taking up space. I didn't notice that it's not ac...
Root file system reported as being 100% without adding any file
1,608,316,791,000
I am going for installing Gentoo for the second time. I read that multiple swap partitions can be created and their entries in /etc/fstab can be prioritised with pri mount option. Just wanted to ask whether that can be done with /home too. Like /dev/sda1 /home ext4 defaults,pri=1 0 2 and /dev/sda2 /home ext4 defaults,...
No not that way. But there are other ways. Here are a few methods, they all do slightly different things. Union file systems: create a layered file-system. A read-only as the base, then another overlay that is writable, and stored only the changes. LVM, ZFS (and some other file systems): allow file-systems to span mu...
Span /home on multiple partitions
1,608,316,791,000
My ubuntu 18.04 boots into read only filesystem / and i really dont know why. I know, that a bad fstab can cause this problem, but my fstab looks okay: # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust ...
Uncommenting the line, as already mentioned, would surely solve the problem (and, as you confirmed, it actually did). As this might be someone else's problem, and the title says fstab is alright, I'll add something else that I think might be relevant for people looking for the same question. I'm uncertain whether the ...
root is mounted as read only filesystem but /etc/fstab looks alright [closed]
1,608,316,791,000
As per the title, I would like to mount automatically the OMV5 samba shared folders onto FSTAB, however I failed multiple times. The shared folder is called Rsync_Dell and it is on a static IP.
Found an answer: Create a folder in mnt; paste this pattern to access to samba shared folder automatically after boots. This command line should be added in /etc/fstab //192.168.XXX.XXX/SourceFolder_name /mnt/TargetFolder_name cifs uid=1000,rw,suid,username=Username,password=Password 0 0 cifs is the type of file sy...
Linking samba shared folders onto FSTAB linux
1,608,316,791,000
I am very new to Linux and it seems that i have created an bad issue. I wanted to install another OS on a disc already in use by my Linux Manjaro. I did format the disc and installed the os. I forgot to remove it from the fstab file, so every time i boot i tries to start the device that does no longer exist. More spec...
Step 1: get into the emergency mode. Step 2: update your fstab file (typically using nano) with the correct parameters. Step 3: restart your computer.
Remove start job for disc not in use
1,608,316,791,000
An application running under RHEL 7.x wasn't able to execute atomic file movement from /tmp to /home. It turned out they are located on different partitions # df -h /tmp/ /dev/mapper/rhel-tmp 3,9G 17M 3,6G 1% /tmp # df -h /home/ /dev/mapper/rhel-root 7,3G 1,9G 5,1G 28% / A...
I was right. After removal of corresponding entry in /etc/fstab /tmp moved to /dev/mapper/rhel-root
Making /tmp and /home be on the same partition
1,608,316,791,000
I am trying to convert this command line: sudo mount -t cifs //192.168.20.202/torrents /media/NAS -o username=x,password=y,dir_mode=0777,file_mode=0777 Into /etc/fstab entry, but it keeps mounting without 777 level of privileges. So far I have this: //192.168.20.202/torrents /media/NAS cifs uid=root,gid=root,username...
You wrote: //192.168.20.202/torrents /media/NAS cifs uid=root,gid=root,username=x,password=y,0 0 But you want to: //192.168.20.202/torrents /media/NAS cifs username=x,password=y,dir_mode=0777,file_mode=0777 0 0
Mounting Windows shared folder with fstab
1,608,316,791,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,608,316,791,000
Backstory: I have a CentOS image on VirtualBox running on my local machine. (I created a group hadoop and user hduser to run Hadoop services on it.) I created a folder on my MacOS called shared. I did the same in the the VirtualBox image (under user hduser). The directories are successfully mounted in the sense that I...
I have managed to solve the issue. I initially followed the instructions from this github post where it is suggested to use these settings: shared /home/hduser/shared vboxsf defaults,uid=1000,gid=1000,umask=0022 0 0 However, that didn't work in my case. Instead it is either: shared /home/hduser/share...
No write permissions after shared directory mount from fstab
1,608,316,791,000
I'm trying to mount at boot a HFS+ core partition in Linux Ubuntu. I followed some other questions here and I came up with this mount command, which seems to properly work, providing read/write access to the partition: sudo mount -t hfsplus -o force,rw,sizelimit=$((935960064*512)) /dev/sda2 mount Now I would like it ...
Your sizelimit is not identical. Could this be the cause?
Adding new HFS+ partition to fstab
1,486,823,193,000
I've got a second hard drive in my laptop. However, it only mounts itself when I load the GUI and click on the device in Nemo. What I'd like is for it to automount on boot. sudo lsblk -f NAME FSTYPE LABEL UUID MOUNTPOINT sdb ...
As @Thomas points out in comments, the following worked: sudo mkdir /mnt/data Then in fstab: /dev/mapper/luks-3df2999e-9b64-46ec-b634-7986877c57f5 /mnt/data ext4 defaults 0 2
Secondary LUKS physical volume won't automount
1,486,823,193,000
I'm mounting my NAS/NFS share to /mnt/nas on my notebook/wlan connection. This did work until last week. Mounting the NFS share with two other wired PCs (same distro) still works. In Debian / Arch Linux forums they suggested to add more x-systemd options to the fstab noauto x-systemd.automount x-systemd.requires=netw...
If you read this, you might probably have the same problem I had. My hint was comming from journalctl | grep nas systemd[1]: mnt-nas.automount: Got automount request for /mnt/nas, triggered by 746 (zeitgeist-datah) I simply uninstalled the zeitgeist package - not sure why it was installed, and mounting works again
Mount NFS share on notebook (wlan)
1,486,823,193,000
I am working on a desktop running on Ubuntu 16.04. I want to isolate the directories /var, /etc, /opt in separate partitions. Creating new partitions is fine. At this moment, the fstab only mounts copies (say, /media/var, /media/etc, /media/opt) on the newly created partitions, so as to interfere with the ordinary co...
You can use the same mount options for standalone parts of the system such as /var, /opt, etc. Using defaults is not the cause of your problem. Your description is not precise enough to identify what went wrong in one attempt and why the other attempt succeeded. However, there's one thing you mention that's doomed to ...
fstab mount options for /etc /opt /var partitions
1,486,823,193,000
I'm on a Raspberry with DietPI distro and I cannot mount a NTFS hard drive at boot. This is the fstab file: #Internal Drives--------------------------------------------------- proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults,noatime 0 2 /dev/mm...
This issue can occur if your USB HDD is not fully powered up, before the filesystem mounting service (fstab) is completed. Resolution: Add a boot delay to cmdline.txt The default /etc/fstab used in DietPi will automatically mount a single connected ext4/ntfs drive from /dev/sda1 to /mnt/usb_1. Modifying the fstab ent...
External HDD not mounted at boot, but fstab seems ok
1,486,823,193,000
During boot, some/many mount points in /etc/fstab are not mounted. The /etc/mtab file contains these mount points - my understanding is that the system believes the filesystems are already mounted. Modifying my /etc/rc.d/init.d/mountfs script (taken from LFS) with the line grep -v root /proc/mounts > /etc/mtab befor...
Issuing grep -v root /proc/mounts > /etc/mtab; echo "/dev/sda9 / ext4 defaults 1 1" >> /etc/mtab fixed this problem. The startup issue was due to the mtab file having entries not properly removed during shutdown. Once the root filesystem was added to the mtab file (after boot), the shutdown occured properly and then s...
Problems with (local) mount at boot (sysvinit)
1,486,823,193,000
I am having a problem with mounting an internal SSD. For some reason The mounting point is chosen as /media/user/Data instead of, as specified in /etc/fstab, /mnt/Data. The according line in /etc/fstab goes as follows: UUID="064ced5e-19c1-43d1-876f-3de0c115b65e" /mnt/Data ext4 users,noauto,exec,rw,async,d...
Given the simplicity of the /etc/fstab parser I would expect, removing the quotes around the UUID in the affected entry might help that is, use UUID=064ced5e-19c1-43d1-876f-3de0c115b65e /mnt/Data ... instead of UUID="064ced5e-19c1-43d1-876f-3de0c115b65e" /mnt/Data ...
Wrong mount point for internal SSD
1,486,823,193,000
I added three drives to the fstab file following a tutorial but only one of them mounts at startup. I tried sudo mount -a and all three drives mounted. fstab: # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more r...
You are mounting all three NTFS partitions to the same mount point (/media/data). You probably want to modify the entries in your /etc/fstab like so: UUID=B28691348690F9D5 /media/data1 ntfs defaults 0 0 UUID=228C52CC8C5299DD /media/data2 ntfs defaults 0 0 UUID=40D6A802D6A7F676 /media/data3 ntfs de...
Hard drives added to fstab not mounting at startup – Pop-OS 20.04
1,486,823,193,000
OS: Ubuntu 18.04 Today I noticed that some script has modified my /etc/fstab and commented out the efivars partition: # /boot/efi was on /dev/nvme0n1p1 during installation # UUID=1562-9EFD /boot/efi vfat umask=0077 0 1 This was resulting in an error while installing an update for grub as it could...
you can try chattr chattr - change file attributes on a Linux file system To set attribute : chattr +i file To unset : chattr -i file
Prevent post-install scripts from modifying /etc/fstab
1,486,823,193,000
Background I'd like to store music on /dev/sda1, which is a physically separate drive. The /etc/fstab contains: # grep "music" /etc/fstab UUID=10...92 /mnt/music ext4 defaults,user,rw 0 2 Problem When the system restarts, the files disappear: # ls /mnt/music/ lost+found When unmounting the drive, the files reappear:...
Your problem is that you wrote the files to the wrong filesystem (the one containing the /mnt/music directory, rather than the on on /dev/sda1). To fix this, get the admin to move the mount elsewhere, and move the files from /mnt/music into the mounted filesystem. user-only version Alternatively, as an ordinar...
Why do my files only appear when the drive is unmounted?
1,486,823,193,000
Okay so I was messing around in the fstab file under /etc/ and I made a new partition which I could play around with, this partitions name is /dev/sda2. So when I was messing around I did this configuration on my /dev/sda2 partition. Once I was done, I rebooted the system and it didn't load the system and it only allo...
The cause is errors=remount-rw, acceptable valuse are : errors={continue|remount-ro|panic} This is what ext4 man page says EXT4(5) : The ext4 filesystem is an advanced level of the ext3 filesystem which incorporates scalability and reliability enhancements for supporting large filesystem. The option...
Fstab Configuration Help
1,486,823,193,000
I use the following command to mount an NFS share from another system on Debian: sudo mount hypercube.home:/volume1/ /mnt/hypercube/ But this does not persist after boot. I believe I need to add something to fstab but the syntax is probably different and I'm not sure what's the correct syntax for NFS shares. How can I...
Add a line to /etc/fstab: hypercube.home:/volume1 /mnt/hypercube nfs4 defaults,_netdev 0 0 If the target system isn’t always on, you might like to check the options described in Debian NFS wait too long when the other Debian is turned off in addition to the above.
How to automatically mount NFS share from another system automatically at boot?
1,486,823,193,000
at every boot of my system I should check the file "/etc/fstab": # UNCONFIGURED FSTAB FOR BASE SYSTEM #/dev/disk/by-partlabel/userdata /userdata ext4 defaults 0 2 #/dev/disk/by-partlabel/oem /oem ext4 defaults 0 2 and if the lines: /dev/disk/by-partlabel/userdata /dev/disk/by-...
Rather that pointing at numbered lines, you should ask sed to operate only on lines that match a pattern. Here's a way you could do that: sed -ri.bak '/^#[/]dev[/]disk[/]by-partlabel[/](userdata|oem)( |\t)/ s/^#//' /etc/fstab There's no need to copy the file, you can tell sed -i to create it for you by giving it the...
Check & Modify /etc/fstab
1,373,982,804,000
scp works well in all cases, but the Raspberry Pi is to weak to copy files efficiently in a secure environment (lan). The theoretically possible 6,75 MB/s via 54 Mbit wireless lan shrink down to about 1.1 MB/s. Is there a way to copy files remotely without encryption? It should be a cli command with no dependencies t...
You might be looking for rcp, it performs remote execution via rsh so you will have to rely on that and have in mind that all communication are insecure.
Copy files without encryption (ssh) in local network
1,373,982,804,000
I'm trying to copy a file from one of my local machines to a remote machine. Copying a file with size upto 1405 bytes works fine. When I try to scp a larger file, the file gets copied but the scp process hangs up and doesn't exit. I have to hit Ctrl-C to return back to the shell. I have observed the same behavior wit...
This definitely sounds like MTU problems (like @Konerak pointed out), this is how I would test this: ip link set eth0 mtu 1400 This temporarily sets the allowed size for network packets to 1400 on the network interface eth0 (you might need to adjust the name). Your system will then split all packets above this size b...
Why does SCP hang on copying files larger than 1405 bytes? [duplicate]
1,373,982,804,000
I'm trying to upload all the text files within the current folder via FTP to a server location using curl. I tried the following line: curl -T "{file1.txt, file2.txt}" ftp://XXX --user YYY where XXX is the server's IP address and YYY is the username and password. I'm able to transfer file1.txt to the server successf...
Your first command should work without whitespaces: curl -T "{file1.txt,file2.txt}" ftp://XXX/ -user YYY Also note the trailing "/" in the URLs above. This is curl's manual entry about option "-T": -T, --upload-file This transfers the specified local file to the remote URL. If there is no file part in the specified...
Uploading multiple files via FTP using curl
1,373,982,804,000
How do I check which FTP (Passive or Active) is running? By default, passive FTP is running in linux, but how do I check?
I found the answer as below. in passive mode we can run ls command but in active mode we have to manually disable passive mode by typing passive command then it will accept ls command otherwise it's gives 550 permission denied error . see below (pasv_enable=NO in vsftpd.conf) ftp> passive Passive mode on. ftp> ls 550 ...
How to check the Passive and Active FTP
1,373,982,804,000
I love linux because I get control over my system. But I do herald from the school of mac, where things are simple, beautiful, and powerful. I like it that way, as opposed to having lots of knobs and levers and everything. Does anyone know of a strong FTP client for linux that is in the vein of Panic's Transmit? It's...
Since you're using Gnome on Ubuntu, why not use the default file manager (Nautilus)? Under Ubuntu 10.04, choose “Connect to Server” in the Places menu, select “Public FTP” or “FTP (with login)” as the service type, enter the server name and other parameters (you can define bookmarks in this dialog box too), and voilà....
FTP client with a good GUI?
1,373,982,804,000
Moving a tried-and-true vsftpd configuration onto a new server with Fedora 16, I ran into a problem. All seems to go as it should, but user authentication fails. I cannot find any entry in any log that indicates what happened. Here is the full config file: anonymous_enable=NO local_enable=YES write_enable=YES local_...
Whew. I solved the problem. It amounts to a config but within /etc/pam.d/vsftpd Because ssh sessions succeeded while ftp sessions failed, I went to /etc/pam.d/vsftpd, removed everything that was there and instead placed the contents of ./sshd to match the rules precisely. All worked! By method of elimination, I fou...
vsftpd fails pam authentication
1,373,982,804,000
I have a firewall (csf) that lets you to separately allow incoming and outgoing TCP ports. My question is, why would anyone want to have any outgoing ports closed? I understand that by default you might want to have all ports closed for incoming connections. From there, if you are running an HTTP server you might want...
There can be many reasons why someone might want to have outgoing ports closed. Here are some that I have applied to various servers at various times The machine is in a corporate environment where only outbound web traffic is permitted, and that via a proxy. All other ports are closed because they are not needed. Th...
What's the point of firewalling outgoing connections?
1,373,982,804,000
ftp ftp://bapte:[email protected] And I got ftp: ftp://bapte:[email protected]: Name or service not known I tried a bunch of different things. I looked at manual. No luck I tried ftp -user username password ftp.backupte4.rsyncbackup.info as said in manual ftp: u: unknown option All I need is a sample that works. ...
you can't exactly do it with a command line option, but what you can do is redirect stdin like so: $ ftp -n ftp.backupte4.rsyncbackup.info << EOF > quote USER bapte > quote PASS b2p7Ua2 > put somefile <-- this is the command you want to execute > quit > EOF or you can put it in a script: #!/bin/sh ftp -n ftp.backupt...
How to specify username password for ftp
1,373,982,804,000
I need to upload a directory with a rather complicated tree (lots of subdirectories, etc.) by FTP. I am unable to compress this directory, since I do not have any access to the destination apart from FTP - e.g. no tar. Since this is over a very long distance (USA => Australia), latency is quite high. Following the adv...
lftp would do this with the command mirror -R -P 20 localpath - mirror syncs between locations, and -R uses the remote server as the destination , with P doing 20 parallel transfers at once. As explained in man lftp: mirror [OPTS] [source [target]] Mirror specified source directory to local target directory. I...
How can I parallelise the upload of a directory by FTP?
1,373,982,804,000
I would like to backup some of my very important data on a remote machine. Currently I'm just saving it to my local machine by using this command: tar -cvjf ~/backups/Backup.tar.bz2 ~/importantfiles/* I would prefer not using another command to transger it to the remote machine, meaning I would like to just have this ...
For SSH: tar czf - . | ssh remote "( cd /somewhere ; cat > file.tar.gz )" For SFTP: outfile=/tmp/test.tar.gz tar cvf $outfile . && echo "put $outfile" | sftp remote:/tmp/ Connecting to remote... Changing to: /tmp/ sftp> put /tmp/test.tar.gz Uploading /tmp/test.tar.gz to /tmp/test.tar.gz /tmp/test.tar.gz Another SFTP...
How to make tar save the archive on a remote machine using sftp or ftp?
1,373,982,804,000
Why do I get kicked out of a FTP session once I run a command? It seems that once I successfully login into a server is get the following after running a command such as "ls" (I've enclosed the error portion in the "[ERROR]" tags): allen92@allen92-VirtualBox:~/Videos$ ftp -n ftp.FreeBSD.org Connected to ftp.FreeBSD.or...
There is most likely a NAT-firewall between you and the servers showing the symptom. (NAT-firewalls hide a whole network behind a single IP-number). The problem is that ftp wants to send the data resulting from the command in a new, separate TCP/IP connection and that cannot go through the firewall because it needs t...
Why do I get kicked out of a FTP session once I run a command?
1,373,982,804,000
When SCP'ing to my Fedora server, a user keeps getting errors about not being able to modify file timestamps ("set time: operation not permitted"). The user is not the owner of the file, but we cannot chown files to this user for security reasons. The user can sudo, but since this is happening via an SCP/FTP client, t...
Why it doesn't work When you attempt to change the modification time of a file with touch, or more generally with the underlying system call utime, there are two cases. You are attempting to set the file's modification time to a specific time. This requires that you are the owner of the file. (Technically speaking, t...
User can't touch -t
1,373,982,804,000
Computer A (assumed that ip is 44.44.44.44)can ftp the host 130.89.148.12. ftp 130.89.148.12 Connected to 130.89.148.12. 220 ftp.debian.org FTP server Name (130.89.148.12:debian8): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files...
Your approach is not taking in account that contrary to other common protocols, FTP uses both port 20 and port 21 over TCP by default. The term passive refers that the protocol is slightly better behaved than the initial implementations. Here is a link: http://www.slacksite.com/other/ftp.html Port 20/TCP is used for...
Why doesn't FTP work through my ssh tunnel?
1,373,982,804,000
I'd like to give temporary SFTP access to a support guy. How do I create an SFTP user? And how can I delete it once the job is done? Also, how do I specify a home directory for them? Can I prevent them from accessing certain subdirectories within their home directory? We use CentOS 6.3 and fzSftp
Non-chroot access If you don't have a FTP server setup, and you trust the user that will be logging in, not to go poking around your server too much, I'd be inclined to give them an account to SFTP into the system instead. The CentOS wiki maintains a simple howto titled: Simple SFTP setup that makes this pretty pain f...
How can I create an SFTP user in CentOS?
1,373,982,804,000
I want to duplicate a directory on an FTP server I'm connected to from my Mac via the command-line Let's say I have file. I want to have files2 with all of file's subdirectories and files, in the same directory as the original. What would be the simplest way to achieve this? EDIT: With mget and mput you could download...
What you have is not a unix command line, what you have is an FTP session. FTP is designed primarily to upload and download files, it's not designed for general file management, and it doesn't let you run arbitrary commands on the server. In particular, as far as I know, there is no way to trigger a file copy on the s...
Easiest way to duplicate directory over FTP
1,373,982,804,000
I want to automate a call to ftp in a shell script. If I type $ftp somehost.domain.com I am prompted for a username and password. I want to give that username and password as part of the call to ftp. The man page for ftp says I can issue a user command at the ftp prompt -- but I want to login to ftp all in one go. Is...
Use a .netrc file in your home directory. The content is: # machine <hostname> login <username> password <password> machine ftp.example.com login myuser password $ecret If this is something you're doing programmatically, write the .netrc before connecting, delete it when you're done.
How to specify username and password in ftp command?
1,373,982,804,000
With lftp, when I do ls I get the listing of the files on the FTP server, with their date. However, the timezone is not displayed. On my local machine, I can do ls -l --time-style=full-iso to see the timezone, but this command doesn't work with lftp. Generally speaking, does the FTP protocol allow for server timezone...
http://ohse.de/uwe/ftpcopy/faq.html#timestamp The FTP protocol, misdesigned as it is, doesn't include time zone information. This means client programs have to guess what the time zone of the server is. At least my programs aren't good in guessing, so they don't even try. ftpcopy simply assumes UTC (GMT, greenwhic...
How to get the timezone of a FTP server?
1,373,982,804,000
I'm on Arch. When pacman tries to download a package from an ftp server, It fails with the error message Protocol rsync not supported or disabled in libcurl This has been bugging me for a little while now, but I can't remember what I did to cause it (Pacman just downloads from an http server instead, so I've been ab...
libcurl does not support the rsync protocol. From the libcurl FAQ: Section 3.21 3.21 Protocol xxx not supported or disabled in libcurl When passing on a URL to curl to use, it may respond that the particular protocol is not supported or disabled. The particular way this error message is phrased is because...
How do I enable rsync in libcurl?
1,373,982,804,000
I'm attempting to download a year's worth of data from an NOAA FTP Server using wget (or ncftpget). However, it takes way longer than it should due to FTP's overhead (I think). For instance, this command time wget -nv -m ftp://ftp:[email protected]/pub/data/noaa/2015 -O /weather/noaa/2015 Or similarly, via ncftpget n...
Here's how I ended up doing solving this using the advice from others. The NOAA in this case has an FTP and an HTTP resource for this, so what I wrote a script that does the following: ncftpls to get a list of files sed to complete the filepaths to a full list of http files aria2c to quickly download them all Exampl...
Speeding up Recursive FTP
1,373,982,804,000
People around the net are all yelling how insecure it is to have writable root FTP directory, if you configure your FTP server with the chroot option (vsftpd won't even run). I miss the explanation why is it bad? Could someone expand a little bit more on that topic and explain what are the dangers, how a chroot direct...
The attack here is commonly known as the "Roaring Beast" attack; you can read more about it in these bulletins: https://www.auscert.org.au/bulletins/15286/ https://www.auscert.org.au/bulletins/15526/ In order to use the chroot(2) function, the FTP server must have root privileges. Later, the unprivileged client req...
What are the dangers of having writable chroot directory for FTP?
1,373,982,804,000
I have multiple users on a server. They upload and download their files through FTP. Sometimes some heavy transfer causes high load on the server. I am wondering, if there is any way to limit the ftp speed to avoid high load. Any help would be much appreciated.
I found a way to limit ftp speed: In the /etc/proftpd.conf insert this line: TransferRate RETR,STOR,APPE,STOU 2000 This will limit ftp speed to 2 megabyte per second. After changing the file you should restart the proftpd service: /etc/init.d/proftpd restart
How to limit ftp speed
1,373,982,804,000
Oh! with my slow net connection, I am badly stuck. I was uploading a video file from local box to remote one via ftp. But net failed.I know there is a command named reget to resume download but Is there any command to resume upload.? If no then I am hit.
I always use the lftp client which has the ability to resume a download that either died midstream or that I want to cancel and later restart. I usually use the command like so: $ lftp -e "mirror -c /download/<dir> /local/<dir>" -u user -p <port> ftp.server.com What else? This tool's name is a bit misleading, it can ...
Is there any ftp command to resume upload?
1,373,982,804,000
When I did the command : wget -r ftp://user:[email protected]/ It's missing any sub-sub-directories. Does recursive FTP have a limit?
How many level deep are you getting? If you need more than 5, you need to provide the -l option. man wget -r --recursive Turn on recursive retrieving. The default maximum depth is 5. -l depth --level=depth Specify recursion maximum depth level depth. -m --mirror Turn on options suitable for mirroring. T...
Why doesn't wget -r get all FTP subdirectories?
1,373,982,804,000
From the command line, I want to download a file from a FTP server. Once the download completes, I want the file to be deleted on the server. Is there any way to do this? Originally I considered wget, but there is no particular reason why to use that specifically. Any tool would be fine as long as it runs on Linux.
with curl: curl ftp://example.com/ -X 'DELE myfile.zip' --user username:password
How can I download a file from a FTP server, then automatically delete it from the server once the download completes?
1,373,982,804,000
I have user that have a symlink to somewhere in the computer like this : # ls -ltr /home/guirec0 total 4 lrwxrwxrwx 1 root root 24 Jan 9 17:56 int -> /disk2/clients/optik/int drwxr-xr-x 2 guirec0 guirec0 4096 Jan 9 18:13 blabla I use sftp to connect to this user. I have this setup in /etc/ssh/sshd_config :...
Use bind mount instead of symlink: rm /home/guirec0/int mkdir /home/guirec0/int mount --bind /disk2/clients/optik/int /home/guirec0/int
allow access to a symlink when chrooted on the home directory
1,373,982,804,000
Currently I'm running this command: curlftpfs user_name:password@hostname ~/mnt/sitename It mounts the contents of main ftp dir on server to ~/mnt/sitename. But on server I need to open public_html directory every time. Is it possible to mount /public_html directory from server directly to the mountpoint?
You could specify the path on the FTP server after hostname part in the original command of curlftpfs. For example, you could have your command as, curlftpfs user_name:password@hostname:/var/www/public_html ~/mnt/sitename References https://askubuntu.com/a/323215 https://askubuntu.com/a/200812
Is it possible to mount a subdirectory in ftp server via curlftpfs
1,373,982,804,000
Is there a way to shebang-ify ftp and write small FTP scripts? For example: #!/usr/bin/ftp open 192.168.1.1 put *.gz quit Any thoughts?
Not with the ftp programs I've run into, as they expect a script on their standard input but a shebang would pass the script name on their command line. You can use a here document to pass a script to ftp through a shell wrapper. #!/bin/sh ftp <<EOF open 192.168.1.1 put *.gz EOF Lftp accepts a script name passed as a...
Scripting FTP transfers
1,373,982,804,000
Is there a way to sum up the disk usage of a certain directory while in ftp? I was trying to create a script that will check what is the disk usage of the current directory and prints out the free space for the home directory. Example: ftp> cd /home/directory/ drw-rw-rw- 1 user group 0 Nov 16 /directo...
You could use Perl. From http://aplawrence.com/Unixart/perlnetftp.html: #!/usr/bin/perl my $param = $ARGV[0]; # required modules use Net::FTP; use File::Listing qw(parse_dir); sub getRecursiveDirListing { # create a new instance of the FTP connection my $ftp = Net::FTP->new("fftpserver", Debug=>0) or...
How to check disk usage in ftp?
1,373,982,804,000
When I log in to SSH while forwarding my local port, it's 21 FTP port, with the command: ssh -R 2101:localhost:21 [email protected] -p 8288 After successfully logging in, I sent this command in the SSH: ftp ikiw@localhost -p 2101 The command runs normally, and I also successfully logged into FTP smoothly, but when...
FTP is a horrible protocol. Yes, it uses multiple ports; there's the control port and then each data transfer (ls or get and so on) opens a second new random port. Worse, depending on if you're doing PASV or active mode FTP, the server could try to initiate the connection. FTP isn't easy to handle with forwarding lik...
Cannot do "ls" in FTP while port forwarding to SSH
1,373,982,804,000
I would like to so the same thing like in SSH where you can save the server in the config file. I would also like to save my username and password, so that it is not prompted each time I connect. I use the ftp command,
from man ftp on my CentOS If auto-login is enabled, ftp will check the .netrc (see below) file in the user’s home directory for an entry describing an account on the remote machine. If no entry exists, ftp will prompt for the remote machine login name (default is the user identity on ...
Use configuration file for ftp with auto login enabled upon initial connection
1,373,982,804,000
I don't think it's possible but still I would like to ask if there is any command to transfer a remote file from one directory to other at an FTP prompt. In more detail: I run ftp to a remote machine. I am at the ftp prompt, in the directory /a. By mistake, I have uploaded a file (via put) to this directory, but that'...
I think it depends more on the client that you're using. Take a look at the client, lftp. There's a good tutorial on using it here, titled: Unix: Flexibly moving files with lftp. If you look through the help for lftp you'll notice the command mv. $ lftp lftp :~> help !<shell-command> (commands)...
Move a remote file at an FTP prompt
1,373,982,804,000
I am recently working extensively with a remote system via ftp connection, since the session time is so short that I have to re-login quite often when I finish my work on my local machine, so I need a way to create a custom command/shell script to login to the ftp server with just one word, but the question is how to ...
Usually, ftp command line clients support the configuration file ~/.netrc where you can configure credentials for remote systems, e.g.: machine legacy.system.example.org login juser password keins When you ftp legacy.system.example.org then you don't have to retype this information anymore. If you need to do more aut...
Is there a way to write a script to do ftp login so I don't have to type things over and over again?
1,373,982,804,000
Browsing through FTP help (i.e. ftp> ?), showed me a command name literal, description of which is ftp> ? literal literal Send arbitrary ftp command I tried to do some trial and error, and following is the terminal output. All returned 500 Unknown command. ftp> literal check 500 Unknown command. ftp> literal ...
FTP has quite a few commands. While the client maps some of these to a more userfriendly text interface. For example, if you use ftp -v (depending on your ftp client, the one I use needs ftp -vd), you'll notice something like the following (---> shows what is sent to the server): $ ftp -vd ftp.debian.org Connected to...
What is the use of literal command in ftp?
1,373,982,804,000
I have been wasting more then an hour on this now and I think this should be really simple... I have an azure website that allows me to connect and deploy to it using sftp. I can connect to it fine using FileZilla with the following settings: Host: The host given by azure portal Port: Empty Protocol: FTP - File Trans...
FTP (over TLS) is not SFTP. If you can connect using FTP with FileZilla, you have to use a command-line FTP client. Not SFTP client. Though not all command-line FTP clients support TLS encryption.
Connect to "FTP over TLS" with sftp
1,452,599,967,000
I want to write a lftp script that will download files every 15 minutes from a server every x amount of time. Can someone advise how i can do this? Thanks
First: Create a script. You can call it whatever you want. I will call it downloader.sh. #!/bin/bash PROTOCOL="ftp" URL="server.example.com" LOCALDIR="/home/user/downloads" REMOTEDIR="dir/remote/server/" USER="user" PASS="password" REGEX="*.txt" LOG="/home/user/script.log" cd $LOCALDIR if [ ! $? -eq 0 ]; then e...
LFTP Script to Download Files
1,452,599,967,000
Is there any (simple) way to deny FTP connections based on the general physical location? I plan to use FTP as a simple cloud storage for me and my friends. I use an odroid c2 (similar to raspberry pi but uses arm64 architecture) running Debian 8 with proftpd and ufw as my firewall. Ftp server runs on a non-standard p...
Use pam and geoip module This PAM module provides GeoIP checking for logins. The user can be allowed or denied based on the location of the originating IP address. This is similar to pam_access(8), but uses a GeoIP City or GeoIP Country database instead of host name / IP matching.
Limit FTP connections by area
1,452,599,967,000
Without SSL, FTP works fine over a stateful Firewall, like netfilter (iptables) + the nf_conntrack_ftp kernel module like this: # modprobe nf_conntrack_ftp # iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT # iptables -A INPUT -p tcp --dport 21 -j ACCEPT The problem is that, when SSL is used, t...
There are several modes with SSL and FTP: Implicit SSL, that is SSL from start (usually port 990) and never plain text. In this case you get no clear text information at the firewall about the dynamic data ports and thus cannot restrict communication to only these ports. Explicit SSL with "AUTH TLS" command before lo...
Proper way to handle FTP over SSL with restrictive firewall rules?
1,452,599,967,000
I have a question concerning permissions. I'm running lighttpd and a ftp server. I want to add a ftp user that is able to upload files to /var/www, which then are viewable in a browser. What is the safest way to set this up (apart from not using ftp)?
usermod -a -G ftp user chown -R :ftp /var/www/html chmod -R g+w /var/www/html
File permissions issue with webserver and ftp server
1,452,599,967,000
I installed vsftpd and was in the process of configuring it. When I sent the vsftpd server stop command: sudo service vsftpd stop I received: stop: Unknown instance So I went ahead and uninstalled it and rebooted the system sudo apt-get remove --purge vsftpd when I 'stop' vsftpd now it says: vsftpd: unrecognized se...
SFTP is not FTP. It's the sftp subsystem of ssh, it's handled by the sshd daemon, not vsftpd or any FTP server. It's on the ssh TCP port (22), not the FTP port 21 (well FTP commands are on 21 while data connections are on arbitrary ports, and those multiple connections in FTP are one of the many reasons why SFTP is so...
I uninstalled vsftpd, but I can still connect with sftp
1,452,599,967,000
I'm setting up and FTP server, and I want to be able to login myself and do whatever I want, but if I want others to connect to my server, I give them credentials that restrict them to the home directory. I've created the user with: adduser username passwd username mkdir /home/user_dir usermod -d /home/user_dir I the...
Look at your /etc/passwd file Find your user and look shell (example ttr:x:501:501::/home/username/ttr:/sbin/nologin) Add this shell (/bin/false or /sbin/nologin) to your /etc/shell or /etc/shells After that, check your connection Try again...If it still does not work Back up the config file before making a change; s...
Added a user with adduser, but can't login with that user through FTP