[CentOS] Very weird problem with handling symbolic links
Hi everyone, I just discovered something very weird on a vanilla CentOS 7 installation. If I create a link to /tmp as a normal user, it looks like I can't remove this link anymore. Here's what this looks like: $ mkdir test_link $ cd test_link/ $ ln -s /tmp/ link_to_tmp $ ls -l total 0 lrwxrwxrwx. 1 kikinovak kikinovak 5 Sep 17 10:56 link_to_tmp -> /tmp/ $ rm link_to_tmp/ rm: cannot remove ‘link_to_tmp/’: Is a directory $ rmdir link_to_tmp/ rmdir: failed to remove ‘link_to_tmp/’: Not a directory I tried the same thing on a different box, running Slackware 14.2, and I can remove my symbolic link without any hassle. I sense something is very wrong here. Any suggestions? Niki -- Microlinux - Solutions informatiques durables 7, place de l'église - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : i...@microlinux.fr Tél. : 04 66 63 10 32 ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Very weird problem with handling symbolic links
Le 17/09/2018 à 11:05, Nicolas Kovacs a écrit : > $ mkdir test_link > $ cd test_link/ > $ ln -s /tmp/ link_to_tmp > $ ls -l > total 0 > lrwxrwxrwx. 1 kikinovak kikinovak 5 Sep 17 10:56 link_to_tmp -> /tmp/ > $ rm link_to_tmp/ > rm: cannot remove ‘link_to_tmp/’: Is a directory > $ rmdir link_to_tmp/ > rmdir: failed to remove ‘link_to_tmp/’: Not a directory I'll answer that myself, since I just found the culprit. The trailing slash in `link_to_tmp/` caused the problem. $ rm link_to_tmp <-- works perfectly This must be one of those rare occasions where tab completion does *not* come in handy. Cheers, Niki -- Microlinux - Solutions informatiques durables 7, place de l'église - 30730 Montpezat Site : https://www.microlinux.fr Blog : https://blog.microlinux.fr Mail : i...@microlinux.fr Tél. : 04 66 63 10 32 ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Very weird problem with handling symbolic links
> > $ mkdir test_link > $ cd test_link/ > $ ln -s /tmp/ link_to_tmp > $ ls -l > total 0 > lrwxrwxrwx. 1 kikinovak kikinovak 5 Sep 17 10:56 link_to_tmp -> /tmp/ > $ rm link_to_tmp/ > rm: cannot remove ‘link_to_tmp/’: Is a directory > $ rmdir link_to_tmp/ > rmdir: failed to remove ‘link_to_tmp/’: Not a directory > > I tried the same thing on a different box, running Slackware 14.2, and I > can remove my symbolic link without any hassle. > > I sense something is very wrong here. Any suggestions? > Yeah, it's just one of the oddities of symlinks. Try doing the rm command without the trailing slash. A symlink isn't a directory, it's an entry that links to a directory - but if you put the trailing slash, rm thinks it is a directory so won't touch it. I think it depends on at what stage the symlink is dereferenced in the rm command. Presumably the rmdir command checks the filetype before doing anything. I came across this when using tab completion - that puts the extra slash on the end when encountering a directory and it caused me to go looking for the answer. P. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
[CentOS] Firefox Issue
We have several small networks, some of which have only four systems that are usually a mix of Windows 7 and CentOS 6 and CentOS 7 machines. All of these systems are Internet connected and updated regularly when yum finds packages available. Information about one of the CentOS 6 machines is included below. This system experienced a Firefox issue. [user@computer]$ uname -a Linux computer 2.6.32-754.3.5.el6.x86_64 #1 SMP Tue Aug 14 20:46:41 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux [user@computer]$ Several weeks ago, one of the Firefox updates did something unusual. It changed the browser-stored home page to https://www.centos.org/ from the original home page file:///usr/share/doc/HTML/index.html. This original home page had been in place since 2014, and had survived all Firefox updates for a little over four years. Last week, someone left one browser running and the system went into power save mode. To wake the system up we used the standard method of a quick push of the power button on the front of the Dell tower system. Although the system seemed to be running, the monitor and mouse never came to life. We also could not ssh into the system from any other computer on the network. We decided to use a steady push on the power button to shut the system down. After powering up again, the system seemed to run normally, but the browser home page was back to file:///usr/share/doc/HTML/index.html. Has anyone else experienced such an issue with Firefox recently? ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] Firefox Issue
On 17/09/18 21:54, Chris Olson via CentOS wrote: We have several small networks, some of which have only four systems that are usually a mix of Windows 7 and CentOS 6 and CentOS 7 machines. All of these systems are Internet connected and updated regularly when yum finds packages available. Information about one of the CentOS 6 machines is included below. This system experienced a Firefox issue. [user@computer]$ uname -a Linux computer 2.6.32-754.3.5.el6.x86_64 #1 SMP Tue Aug 14 20:46:41 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux [user@computer]$ Several weeks ago, one of the Firefox updates did something unusual. It changed the browser-stored home page to https://www.centos.org/ from the original home page file:///usr/share/doc/HTML/index.html. This original home page had been in place since 2014, and had survived all Firefox updates for a little over four years. Last week, someone left one browser running and the system went into power save mode. To wake the system up we used the standard method of a quick push of the power button on the front of the Dell tower system. Although the system seemed to be running, the monitor and mouse never came to life. We also could not ssh into the system from any other computer on the network. We decided to use a steady push on the power button to shut the system down. After powering up again, the system seemed to run normally, but the browser home page was back to file:///usr/share/doc/HTML/index.html. Has anyone else experienced such an issue with Firefox recently? I note each time there is a firefox yum update that the next time I start firefox from closed, that it brings up a tab with the centos homepage and another tab has my start page. The page on display (active tab) is the centos one next start is back to normal. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
[CentOS] LVM and Backups
Hey there, I'm testing LVM snapshot to make backups and I've some questions about snapshot lvm. In my test case I have httpd, postgresql db and a dataset on a VM. Running a backup I follow this steps: 1) Stop httpd 2) Create lvm snapshot on the dataset 3) Backup database 4) restart httpd (to avoid more downtime) 5) mount the snapshot and execute backup 6) umount and remove the snapshot I think that this could be fine (if not please correct me) Now when bacula performs the backup what happen if bacula are copying a specified file and this specified file is modified? Bacula will copy the right file using inode (this will copy the wrong file?) or copy entire file located in the snapshot? Thanks in advance. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] LVM and Backups
On 9/17/18 7:50 AM, Alessandro Baggi wrote: Running a backup I follow this steps: 1) Stop httpd 2) Create lvm snapshot on the dataset 3) Backup database 4) restart httpd (to avoid more downtime) 5) mount the snapshot and execute backup 6) umount and remove the snapshot I think that this could be fine (if not please correct me) That doesn't look right. It should look more like 1) stop or freeze all of the services (httpd and database), 2) make the snapshot, 3) start or thaw all of the services, 4) mount the snapshot, 5) back up the data, 6) remove the snapshot. Your sequence makes changes (step 3) after the snapshot is taken. In that case, the backup that you made will not be a part of the snapshot. It also prolongs the time that httpd is down unnecessarily. Now when bacula performs the backup what happen if bacula are copying a specifed file and this specified file is modified? If bacula is backing up the content of the snapshot, then changes made in the running services won't affect it. That's the purpose of the snapshot: it's static. Are you using bacula's built-in snapshot support, or are you rolling your own? ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] openl2tp.org compared to openvpn
On Wed, 12 Sep 2018 at 20:25, Gordon Messmer wrote: > > On 09/12/2018 11:58 AM, Gregory P. Ennis wrote: > > Since openl2tp is not part of the centos repositories, does anyone > > have > > good or bad experiences with this. > > You can probably use xl2tpd, which is in EPEL. Also note that l2tp is not by itself a secure vpn.. though various people seem to think it is. It needs to be combined with some other layer security usually ipsec or even another vpn solution. > ___ > CentOS mailing list > CentOS@centos.org > https://lists.centos.org/mailman/listinfo/centos Gordan and Stephen, Thank you both very much. I did find strongswan and xl2tpd in epel, and am going to do some testing with this combination. Thanks again for your help!!! Greg ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] LVM and Backups
Il 17/09/2018 22:12, Gordon Messmer ha scritto: On 9/17/18 7:50 AM, Alessandro Baggi wrote: Running a backup I follow this steps: 1) Stop httpd 2) Create lvm snapshot on the dataset 3) Backup database 4) restart httpd (to avoid more downtime) 5) mount the snapshot and execute backup 6) umount and remove the snapshot I think that this could be fine (if not please correct me) That doesn't look right. It should look more like 1) stop or freeze all of the services (httpd and database), 2) make the snapshot, 3) start or thaw all of the services, 4) mount the snapshot, 5) back up the data, 6) remove the snapshot. About database setup I perform backups via pg_dump so how the snapshot affects pgsql database? What your suggestion I must perform database backup copying only filesystem file and not pgsql.sql database dump? Your sequence makes changes (step 3) after the snapshot is taken. In that case, the backup that you made will not be a part of the snapshot. It also prolongs the time that httpd is down unnecessarily. Now when bacula performs the backup what happen if bacula are copying a specifed file and this specified file is modified? If bacula is backing up the content of the snapshot, then changes made in the running services won't affect it. That's the purpose of the snapshot: it's static. Are you using bacula's built-in snapshot support, or are you rolling your own? No I'm using pre/post job script where I have lvm commands to create and destroy snapshot volume. ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos