[R] Difficulty with saving .Rhistory

T blackswanmabak at yahoo.com
Wed Sep 14 06:55:59 CEST 2011


Current systems

    OS: RedHat SE Linux 5.7, fully patched
    R: R-2.13.1


I am a new R user.


The R installation needs to be very tight because I plan to use it after I am employed on Internet facing systems to analyse firewall and filesystem log data.  Everything to my knowledge regarding R installed correctly.  I saw no warnings until saving THE WORKSPACE.


NON-ROOT OUTPUT CURRENTLY YIELDS THE FOLLOWING ERROR
> q()
Save workspace image? [y/n/c]: y
Warning message:
problem in saving the history file '.Rhistory'
[Object at localhost R]$



The sitrep...


------------------------------------------------------------------------------
INITIAL NON-ROOT OUTPUT WAS THE FOLLOWING
> q()
Save workspace image? [y/n/c]: y
Error in gzfile(file, "wb") : cannot open the connection
In addition: Warning message:
In gzfile(file, "wb") :
  cannot open compressed file '.RDataTmp', probable reason 'Permission denied'
>
> q()
Save workspace image? [y/n/c]: n
Warning message:
In file.remove(outfile) :
  cannot remove file '.RDataTmp', reason 'No such file or directory'


INITIAL ROOT WAS THE FOLLOWING:
>
> q()
Save workspace image? [y/n/c]: y
[root at localhost ~]#


Here is what I did, which I thought would fix everything:

[root at localhost ~]# groupadd -g 666 r_users
[root at localhost ~]# usermod --groups r_users Object
[root at localhost ~]# cat /etc/group | grep r_users
r_users:x:666:Object

[root at localhost ~]# chown -R root:r_users /var/R/R-2.13.1
[root at localhost ~]# 
[root at localhost ~]# find /var/R/R-2.13.1 -type d | xargs chmod g+rwx




Note that I have gREpped for the .RDataTmp file and any variation between "R[Dd]ata" and I see nothing being written but the warnings have stopped...so maybe I am not generating anything to save the workspace.


Now, when using a non-root account I have an issue with the .Rhistory file in that I have the following warnings.

ROOT NOW YIELDS THE FOLLOWING:
> q()
Save workspace image? [y/n/c]: y
[root at localhost ~]#


NON-ROOT OUTPUT NOW YIELDS ANOTHER ERROR
> q()
Save workspace image? [y/n/c]: y
Warning message:
problem in saving the history file '.Rhistory'
[Object at localhost R]$


[Object at localhost R]$ ls -al /var/R/
total 21604
drwxr-xr-x  3 root root        4096 Sep  9 19:02 .
drwxr-xr-x 28 root root        4096 Sep  9 18:57 ..
drwxrwxr-x 15 root r_users     4096 Sep  9 19:05 R-2.13.1
-rw-r--r--  1 root root    22063747 Sep  9 18:58 R-2.13.1.tar.gz

[Object at localhost R]$ ls -al /var/R/R-2.13.1
total 3772
drwxrwxr-x 15 root r_users    4096 Sep  9 19:05 .
drwxr-xr-x  3 root root       4096 Sep  9 19:02 ..
drwxrwxr-x  3 root r_users    4096 Sep  9 19:05 bin
-rw-r--r--  1 root r_users       0 Mar 17  2010 ChangeLog
-rw-r--r--  1 root r_users  356442 Sep  9 19:04 config.log
-rw-r--r--  1 root r_users    9277 Mar 29 17:02 config.site
-rwxr-xr-x  1 root r_users  110293 Sep  9 19:03 config.status
-rwxr-xr-x  1 root r_users 1350078 Jun 30 17:05 configure
-rw-r--r--  1 root r_users   83993 May 30 17:05 configure.ac
-rw-r--r--  1 root r_users   18011 Mar 17  2010 COPYING
drwxrwxr-x  4 root r_users    4096 Sep  9 19:06 doc
drwxrwxr-x  2 root r_users    4096 Sep  9 19:03 etc
drwxrwxr-x  3 root r_users    4096 Sep  9 19:03 include
-rw-r--r--  1 root r_users    1747 Mar 17  2010 INSTALL
drwxrwxr-x  3 root r_users    4096 Sep  9 22:29 lib
...



More information about the R-help mailing list