Re: Duplicate accounts?
On Mon, Feb 28, 2011 at 8:15 PM, Patrick O'Callaghan pocallag...@gmail.com wrote: The Shell will not normally expand * to a name beginning with .. Agreed. A tempest in a teapot. If it did, any command with * will affect the entire filesystem as everything is linked to levels above it with .. FC -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On Monday, February 28, 2011 10:53:34 pm inode0 wrote: On Mon, Feb 28, 2011 at 4:34 PM, Larry Brower la...@maxqe.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 07:47 AM, Alain Spineux wrote: So I did SUDO -i, and from root as shell I tried to chown -hR * fcassia on the Desktop folder... You must switch the star and our user name chown -hR fcassia * You should also avoid doing chown -R with just a * wildcard as this could possibly recursively follow ../ which would then try and change ownership on things you don't want changed. Out of curiosity how can you configure bash to expand a simple * to include ..? You can't. That's the point. The parent post is wrong. It would be totally insane for shell to expand * to include ../ Then any recursive operation on any directory level would also recurse up all the way up to / . That's absurd. Of course recursive changes are always dangerous since there may be symlinks uncovered in the recursion pointing all over the place ... If it's a symlink, the operation would happen to the symlink, not the file it's pointing too. I am not saying one should not be careful to use * and recursive, but it's also useful to know exactly what can and cannot happen. AC -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On Tue, Mar 1, 2011 at 1:12 PM, Armelius Cameron armeli...@gmail.com wrote: On Monday, February 28, 2011 10:53:34 pm inode0 wrote: On Mon, Feb 28, 2011 at 4:34 PM, Larry Brower la...@maxqe.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 07:47 AM, Alain Spineux wrote: So I did SUDO -i, and from root as shell I tried to chown -hR * fcassia on the Desktop folder... You must switch the star and our user name chown -hR fcassia * You should also avoid doing chown -R with just a * wildcard as this could possibly recursively follow ../ which would then try and change ownership on things you don't want changed. Out of curiosity how can you configure bash to expand a simple * to include ..? You can't. That's the point. The parent post is wrong. It would be totally insane for shell to expand * to include ../ Then any recursive operation on any directory level would also recurse up all the way up to / . That's absurd. Yes, I am giving the parent poster a chance to show us how it is possible. Of course recursive changes are always dangerous since there may be symlinks uncovered in the recursion pointing all over the place ... If it's a symlink, the operation would happen to the symlink, not the file it's pointing too. I am not saying one should not be careful to use * and recursive, but it's also useful to know exactly what can and cannot happen. Whether symlinks are followed recursively is a function of the program actually called recursively and often what options are used to call it. chown -HR foo * will on many systems for example try to change the ownership of files after traversing the matched symlinks. John -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On Tue, Mar 1, 2011 at 5:09 PM, inode0 ino...@gmail.com wrote: Yes, I am giving the parent poster a chance to show us how it is possible. I initiated this thread and I find it pretty absurd how it´s got into an entirely different discussion. Whoever made that claim about * extending to the parent directory wasn´t me. FC -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On Tue, Mar 1, 2011 at 1:12 PM, Armelius Cameron armeli...@gmail.com wrote: On Monday, February 28, 2011 10:53:34 pm inode0 wrote: On Mon, Feb 28, 2011 at 4:34 PM, Larry Brower la...@maxqe.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 07:47 AM, Alain Spineux wrote: So I did SUDO -i, and from root as shell I tried to chown -hR * fcassia on the Desktop folder... You must switch the star and our user name chown -hR fcassia * You should also avoid doing chown -R with just a * wildcard as this could possibly recursively follow ../ which would then try and change ownership on things you don't want changed. Out of curiosity how can you configure bash to expand a simple * to include ..? Not as explicit as it could be, but search http://www.gnu.org/software/coreutils/manual/coreutils.txt for cending to see if you can find any evidence the commands will ascend above the current directory. Perhaps one example at that URL is useful: # Change the owner of /u and subfiles to root. chown -hR root /u Note the use of the term subfiles. regards/va...@texoma.net -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Duplicate accounts?
Is this normal? Fedora10 here... # users fcassia fcassia fcassia fcassia fcassia fcassia fcassia [root@doscabezas]# groups root bin daemon sys adm disk wheel Somehow I inardvertedly ended up with a bunch of folders owned by root, and when I attempted to move those around from the user account (fcassia) I got permission issues, as expected. So I did SUDO -i, and from root as shell I tried to chown -hR * fcassia on the Desktop folder... all was fine but one particular file doesn't want to be changed... chown: invalid user: `mail-backup.zip' I must be doing something wrong... FC PS: I figured it out... I had the parameters for chown reversed... file name is always last.Sheesh. Still, is the multiple fcassia accounts output from accounts normal? -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On Mon, Feb 28, 2011 at 11:46 AM, Fernando Cassia fcas...@gmail.com wrote: Is this normal? Fedora10 here... # users fcassia fcassia fcassia fcassia fcassia fcassia fcassia You have opened 7 connections (maybe terminal) with your host, [root@doscabezas]# groups root bin daemon sys adm disk wheel Somehow I inardvertedly ended up with a bunch of folders owned by root, and when I attempted to move those around from the user account (fcassia) I got permission issues, as expected. So I did SUDO -i, and from root as shell I tried to chown -hR * fcassia on the Desktop folder... You must switch the star and our user name chown -hR fcassia * all was fine but one particular file doesn't want to be changed... chown: invalid user: `mail-backup.zip' Or you could have got : file not found : fcassia I must be doing something wrong... FC PS: I figured it out... I had the parameters for chown reversed... file name is always last.Sheesh. Still, is the multiple fcassia accounts output from accounts normal? -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines -- Alain Spineux | aspineux gmail com Your email 100% available | http://www.emailgency.com Send backup mail report | http://www.magikmon.com/mkbackup -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 07:47 AM, Alain Spineux wrote: So I did SUDO -i, and from root as shell I tried to chown -hR * fcassia on the Desktop folder... You must switch the star and our user name chown -hR fcassia * You should also avoid doing chown -R with just a * wildcard as this could possibly recursively follow ../ which would then try and change ownership on things you don't want changed. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCgAGBQJNbCMNAAoJEBgaXYoZ++879UYH/jFEdn65GnvK3cMNq5JL2eAX W5wa+BG4nb1xOG6OHe//36fVMLk9YU1bd8zf2s8R3D8yVEw/cxndnGvyZegr8XYy 8eYq5ZFG092yIcKVSu3spTMz5U4UCwHRNj57y3qpapzzs8ENxt9Dmq17U5oFxvzy kUxCSp26WajYOz1q6Kx2poHoAOMPSVwSHaQWJhFKkhUPkYJ/RPl6wS83peBMSFc3 f1UzaTH0qG5FwQ3LxFKXkZwYGr3UOdJsjuDrFzeAeSA0F7p1c8ekffIycDBSnKIE GQ1xuTB1+sdmGmFFCdqChRvrO0fGfL/pLbI+lIZ2tbvQSfSUecfpedXAdMUOE2k= =CJ9j -END PGP SIGNATURE- -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On Mon, 2011-02-28 at 16:34 -0600, Larry Brower wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 07:47 AM, Alain Spineux wrote: So I did SUDO -i, and from root as shell I tried to chown -hR * fcassia on the Desktop folder... You must switch the star and our user name chown -hR fcassia * You should also avoid doing chown -R with just a * wildcard as this could possibly recursively follow ../ which would then try and change ownership on things you don't want changed. The Shell will not normally expand * to a name beginning with .. Try it: $ echo * See info bash: When a pattern is used for filename expansion, the character `.' at the start of a filename or immediately following a slash must be matched explicitly, unless the shell option `dotglob' is set. poc -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 05:15 PM, Patrick O'Callaghan wrote: The Shell will not normally expand * to a name beginning with .. Try it: $ echo * See info bash: When a pattern is used for filename expansion, the character `.' at the start of a filename or immediately following a slash must be matched explicitly, unless the shell option `dotglob' is set. poc I would say this all depends on the application being invoked and would still say it is bad to just use * as opposed to say ./* I can't count the number of people Ive seen do things like rm -rf * in a directory and it recursively started working on / and /bin etc... -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCgAGBQJNbC6BAAoJEBgaXYoZ++87K7EH/jQPzxF5a2hKwOamptZnuAb2 BNd0Tm7rUUvNItkMVjhA032WoYO75Atftmh8dn0kVmD4Ha9UvQSTFRYszWh6NdpM nZ+vGaNIe0O3OvH5ASK55f+sd+6s0sKVLT7QXykixEaiq1h4CUhox03LD7OfhABr XpgQK/RL3Ca3OlfL4WyeAMC2Hk7hG6WOvVWlJBt523KS21/SXOp3QUgq2fIh05Tl oWbcPwChPxeGJPKSpvpbsvAVS6i1+F+ZQyYC4IoxxglULBzJa5eBdez2ZBoTpteJ h9oNuslNcz+SN6ha5uswixJhHBnqXsJdD04HM8dpwQMF68ZMPPEu5JjMk7nBxSc= =plTa -END PGP SIGNATURE- -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On 2/28/2011 3:23 PM, Larry Brower wrote: I would say this all depends on the application being invoked and would still say it is bad to just use * as opposed to say ./* I can't count the number of people Ive seen do things like rm -rf * in a directory and it recursively started working on / and /bin etc... Not to be a pest, but if you worry about '*' expanding to include dotfiles, then why do you think that './*' is safe? Furthermore, '*' expansion is handled by the shell, not the application--in other words, dotglob rules the day. The '*' there will just as well include dotfiles (i.e., it won't unless dotglob is set as another poster indicated). I definitely agree that caution is warranted when using '*' in any command that can do horrible things to your files, especially for things like 'rm -rf', but don't travel under the misconception that './*' is going to save your bacon--because it won't. -se -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 06:54 PM, Steve Ellis wrote: On 2/28/2011 3:23 PM, Larry Brower wrote: I would say this all depends on the application being invoked and would still say it is bad to just use * as opposed to say ./* I can't count the number of people Ive seen do things like rm -rf * in a directory and it recursively started working on / and /bin etc... Not to be a pest, but if you worry about '*' expanding to include dotfiles, then why do you think that './*' is safe? Furthermore, '*' expansion is handled by the shell, not the application--in other words, dotglob rules the day. The '*' there will just as well include dotfiles (i.e., it won't unless dotglob is set as another poster indicated). I definitely agree that caution is warranted when using '*' in any command that can do horrible things to your files, especially for things like 'rm -rf', but don't travel under the misconception that './*' is going to save your bacon--because it won't. -se ./ explicitly specifies the CWD so what is your basis for saying it wont? While I will admit there could be other factors at play for rm recursively working on the systems Ive seen it happen on I can't say with certainty that there was as files like /etc/profile and /etc/bashrc were already removed by the time I had to work on the issue. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCgAGBQJNbFOIAAoJEBgaXYoZ++87XkAIAIzlq2qo6+Y2gG+DVOd0vXfa g9dMYgqhn7Z6UOkbFoLVKY7Jb/fksivp04Np4Y2+psksqrL+6ZqWjCDZVQ4ukwU0 zHFQDpEg4Tw9oXL2qHPVK407XH7ibIp2wKU5nql7X2y3F3qC6ji0l2TzclR18cRm lj/gF+YFUtgEajWf2qgmv9cnCZuRJA5qpL9vwml/DPiEo4D2Bz/hfV9Bl2vvQypY yc+0nhJJZKmG/mnPAnamluU5DnvGr99z2sk01o6zff1J9fznI/pMXC+9gxZWb12W MLVynsp9IHD0Ir63xCsBLXUnJ2NJmvGErcsltQnOmwoppUKT/PyIYwVaFylzNJA= =E6zh -END PGP SIGNATURE- -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On Mon, 2011-02-28 at 20:01 -0600, Larry Brower wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 06:54 PM, Steve Ellis wrote: On 2/28/2011 3:23 PM, Larry Brower wrote: I would say this all depends on the application being invoked and would still say it is bad to just use * as opposed to say ./* I can't count the number of people Ive seen do things like rm -rf * in a directory and it recursively started working on / and /bin etc... Not to be a pest, but if you worry about '*' expanding to include dotfiles, then why do you think that './*' is safe? Furthermore, '*' expansion is handled by the shell, not the application--in other words, dotglob rules the day. The '*' there will just as well include dotfiles (i.e., it won't unless dotglob is set as another poster indicated). I definitely agree that caution is warranted when using '*' in any command that can do horrible things to your files, especially for things like 'rm -rf', but don't travel under the misconception that './*' is going to save your bacon--because it won't. -se ./ explicitly specifies the CWD so what is your basis for saying it wont? While I will admit there could be other factors at play for rm recursively working on the systems Ive seen it happen on I can't say with certainty that there was as files like /etc/profile and /etc/bashrc were already removed by the time I had to work on the issue. You're confusing path searching, which ./ will block (e.g. run ./ls instead of ls) with filename expansion, which ./ will have no effect on. If you do cd /; rm -rf * then bad things will happen. If you do cd /; rm -rf ./* then exactly the same bad things will happen. poc -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Re: Duplicate accounts?
On Mon, Feb 28, 2011 at 4:34 PM, Larry Brower la...@maxqe.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 02/28/2011 07:47 AM, Alain Spineux wrote: So I did SUDO -i, and from root as shell I tried to chown -hR * fcassia on the Desktop folder... You must switch the star and our user name chown -hR fcassia * You should also avoid doing chown -R with just a * wildcard as this could possibly recursively follow ../ which would then try and change ownership on things you don't want changed. Out of curiosity how can you configure bash to expand a simple * to include ..? Of course recursive changes are always dangerous since there may be symlinks uncovered in the recursion pointing all over the place ... John -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines