[R] write.csv permissions

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Sun May 27 21:34:09 CEST 2012


It is bad practice to do ANYTHING in R as the root user, except possibly install libraries.  This is true for any real work in any application in general... root is only for installing software or modifying the system configuration. The very fact that you are doing analysis in R and saving results is part of your problem... files created by that user are by default not readable by other users.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.



arun <smartpink111 at yahoo.com> wrote:

>Dear R help,
>
>I have a doubt regarding the write.csv function.  When I save a file
>(write.csv(res1,"res1.csv")), it is saving with the read-only
>permission.  I tried to change the permission as a root user with chmod
>u+x.  Though, it says that "-rwxr--r--  1 root root     164 2012-05-27
>10:18 res1.csv", when I open the file it is still read-only.  Is there
>any way to save the file with no restrictions on permission?  I use the
>R  console as a root user (sudo R).
>
>Thanking you,
>A.K.
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list