Code::Blocks Forums
User forums => Help => Topic started by: Alan.Brown on June 15, 2012, 05:18:35 am
-
I am using Code:Blocks with Xubuntu 12.04.
When I load a .c file and make a change, Code:Blocks is unable to save the file. The files reside on an external network drive attached to a modem/router which is formatted to ntfs (this formatting is required by the router).
I presume Code::Blocks cannot find the correct permission settings and assumes that the file is read-only (just a guess!).
Other programs work OK - Geany, Kate, Kdevelop and so on.
I have carefully checked all settings but is there some setting I am missing?
I found the following post: http://forums.codeblocks.org/index.php/topic,10735.msg73563.html#msg73563
I then changed my fstab entry to add umask=000. Then entry now reads
# Network USB Drive
//192.168.0.1/USB /home/user/USB smbfs umask=000,guest,_netdev 0 0
The drive is formatted to ntfs as required by the router but is mounted as smbfs as it is a network drive (mounting it as ntfs does NOT work).
Neither the posting above nor - http://forums.codeblocks.org/index.php/topic,10263.msg70971.html#msg70971 - offer any solution to the problem.
I have tried disabling the wxSmith plugins but that does noy help.
TIA
Alan
-
OK - I have solved my problem. Following the two posts quoted earlier I changed my fstab entry to add uid=1000 and gid=1000. The fstab is now -
# Network USB Drive
//192.168.0.1/USB /home/user/USB smbfs umask=000,uid=1000,gid=1000,guest,_netdev 0 0
I case it helps others the explanation of the entry is
//192.168.0.1 - this is the address of the modem
/USB - the name of the USB drive attached to the modem as the modem sees it
/home/user/USB - the mount point in the home directory
smbfs - the file system since this is a network drive using smb
umask=000 - sets permissions for anyone to write to files
uid=1000,gid=1000 - user and group ids
guest - I don't know what this is for but it is necessary
_netdev
The filesystem resides on a device that requires network access
(used to prevent the system from attempting to mount these
filesystems until the network has been enabled on the system). See man mount
Hope all this helps someone somewhere :)
This may not be a solution for others with different setups.
Alan