Ubuntu :: Permissions - Writing Files In Different Default Permission?
May 10, 2010Currently when I create a folder, it comes down as 755 permissions.
I want it to come down as 775 permissions by default.
How can I change this?
Currently when I create a folder, it comes down as 755 permissions.
I want it to come down as 775 permissions by default.
How can I change this?
I have tried to configure an Enemy Territory Server in an way that a common user could run it just executing a command line. The first thing I did was writing a script like that
/usr/local/games/enemy-territory/etded +set dedicated 1 +set net_port 27960 +set fs_game etpub +set fs_homepath /usr/local/games/enemy-territory/27960 +set sv_punkbuster 1 +set +exec server.cfg +set +exec punkbuster.cfg +set +exec bots.cfg
and then putting it in the /usr/local/bin directory. Ok, the things seem to be fine, but then I realized that the program tries to write some config and log files. I noticed that because some warnings appear in the command line, like that Couldn't write etconfig.cfg always that I run the command as a normal user. On the other hand, if I give writing permission to these files, all the warnings disapear.
But I don't think it is a good way, because someone could change these files by hand, what would not be good.
My last try was to set the suid of the script up, with the command chmod u+s /usr/local/bin/etded-server
But as I already knew that suid does not work well with shell script I wrote a C source like that:
[Code]...
I'm new to Debian. I've read the documentation on this but it is too heavy for a new user to understand. I would like to change the default permissions for newly created files/directories.
I want all newly created files by 'user1' to have the default permissions of:
1. "owner can read and write"
2. "group can read and write"
3. "other can read only"
Permission 1 and 3 are already default. But I would like number 2 to be default as well. (the current default for group is read only).
How to set the default file permissions on ALL newly created files in linux - but differs in important ways:
I want all files created in (or copied to or moved to) a certain directory to inherit a set of default permissions that is different from the system default.
Rationale: The directory in question is the "intake hopper" for an application. Users in a group place files in the directory, and the app (running under another user id in the same group) takes them and processes them. The problem is that the owner of each file placed in the directory is the user that placed it there, and the permissions are defaulting to "rw-r--r--"; I want to change that to "rw-rw----". The app doing the intake can't do that explicitly, because the user id the app is running under doesn't own the file in question, and the default permissions don't allow the app to chmod on the file! Obviously, the user could do a chmod after putting the file there - but I want to keep the "drop" by the user as simple as possible. (These folks are not linux-literate, they just drag and drop the files from their windows desktop to a (Samba) network share - i.e. they don't even know they are interacting with a linux system.)
umask seems too powerful: I don't want to set default permissions for every file created anywhere by these users - just those created in (or placed in) this directory.
Being new to Linux, i've just about got used to the Debian setup procedure now, but had a quick question on the default ownership of files and folders. On my default Debian installation, almost all the folders and files are owned by root:root. Is this the correct advised configuration or should the folders and files be owned by a user without root permissions - eg user:user?
View 12 Replies View RelatedI have a fileserver running openSUSE 11.2 and samba services for file access from MS Windows based workstations. My question relates to changing default permissions on files and directories created from the windows clients.
Following are extracts of the /etc/samba/smb.conf file :
Even with the above entries, sometimes there are files and directories created by the windows clients having permission
Probably my lack of understanding in ACLS.
Is it possible to reset apache 2 permissions to default permissions I'm using Ubuntu 9.10 command line server, would webmin give me this access ?
View 1 Replies View RelatedI tried writing zreos to my HD but it denied permission. How do I get around that ?
View 6 Replies View RelatedI'm fairly new to linux and I have a dual boot laptop with OpenSUSE 11.2 and Windows 7. I have ntfs-3g and have full read-write ability to my Windows drive through OpenSUSE thanks to NTFS - openSUSE. The only problem is whenever I write to the NTFS Windows drive via Dolphin it does the writing but I get an alert box saying:
"Could not change permissions for <path to new file>" with an OK button.
If I write more than one file I'll get one alert box for each file unless I don't press OK until after it finishes writing all the files in which case it will just give me that one that it was showing (once I press OK there aren't any more boxes).
Since I have full ability to read-write this isn't that big of a problem it's just annoying as hell an I'm sure it's pretty simple to get rid of. code...
I partitioned my drive to dual boot with XP, and I also added in a fat32 partition so both Windows and Linux can read/write to there to share files. I now have a problem with permissions (I know that fat32/vfat does not support permissions.) I can as my normal user read/write to this partition, but I want to set-up a CodeBlocks project on there and this is where I run into my permissions error.I can create it and the .cbp file is there ect. but I can not save any work, it will complain ('could not write', or sometimes with 'maybe this drive is write protected'.) I have something like
UUID=1234-1A23 /repo vfat defaults,umask=000 0 0
in my /etc/fstab
I just noticed on my Ubuntu machine (ext3 filesystem) that removing write permissions from a file does not keep root from writing to it. Is this a general rule of UNIX file permissions? Or specific to Ubuntu? Or a misconfiguration on my machine? Writing to the file fails (as expected) if I do this from my normal user account.Is this normal behavior?Is there a way to prevent root from accidentally writing to a file (Preferably using normal filesystem mechanisms, not AppArmor, etc.)
I understand that root has total control over the system and can, eg, change the permissions on any file.My question is whether currently set permissions are enforced on code running as root. The idea is the root user preventing her/himself from accidentally writing to a file. also understand that one should not be logged in as root for normal operations.
I would like not check first, and if not ok, then to write the permssisions. Means no use to write endessly on disk if not needed. How to check and fix the permissions to avoid writing (chmod o-rwx /home/*) ?
View 3 Replies View RelatedI need to know if there are better burning utilities , I am using the default Brasero with many writing errors
View 2 Replies View RelatedI am using Xampp on ubuntu 10.04 and I have set my document root to a folder in my home directory for ease of use with netbeans. There are several times where I have to manually go and change the permission to 755. If you just place a file in the directory it does not default to 755, seems odd since the document root folder is in my home directory. Chmod works fine but I was wondering is their a way to make all files or folders added to my document root to default to 755?
View 2 Replies View Relatedim looking to allow virtualbox raw disk access to /dev/sdb
currently if i
ls -l /dev/sdb
brw-rw---- 1 root disk 8,2010-01-04 17:00 /dev/sdb
now if i chmod this to 777 or use chown to change the owner this temporarily works but after a few moments it defaults back to its original permissions.
is there a way i can define the permission? i was thinking fstab but i can't have a mount point?
I'm trying to install Amanda 3.2 on Ubuntu 10.10 (Maverick) using Ubuntu 10.04 deb package. The installation was successful using the dpkg command. The problem crops up when configuring such amanda. When creating a user amandabackup using passwd amandabackup and then enter in it through su - amandabackup a permission denied problem comes up. When enter amserverconfig Dailyset 1 etc etc the server response with :
amservingconfig: critical (fatal): Cannot create debug file "/var/log/amanda/server/amserverconfig.2010120307947.debug": Permission denied and continues
The permissions are set to rw 1 amandabackup backup. I can't understand why it's telling me permission denied each time.
I would like to change the dialogue that says "permission denied" when something has to be done as root or that user does not have permission to do something. Is this at all possible? (Also, not really sure which category this should be in, that's why it's here)
View 1 Replies View RelatedI want to perform an action with a shell script and then log the event in a file in /var/log. However, I keep getting permission denied error messages.
View 5 Replies View RelatedI have a file server running a cronjob to reset file permissions on a regular basis. I was thinking, I wonder if there is a way to do the chmod and chown command in a single command, as I always have to do both on the same folder, the way that you can do "chown root:users Uploads" instead of having to do two separate commands for chown and chgrp.
Then I got to thinking, are these commands even necessary? Every file copied or moved into these folders by any user needs to be something like "chmod 750" and "chgrp root:users", so rather than running a cronjob to do these modifications at regular intervals, there ought to be a way to set the folder permissions so that any files contained within will have these permissions.
The problem arises because users create documents, then a supervisor with elevated privileges can move those documents into a shared folder, however the permissions are wrong, they are user1:user1 for the owner and group and the other users can't read the file until a cronjob changes the group to be users. This has actually been acceptable, but certainly there is a better way to do this.
my dad has been using Ubuntu for a few weeks now and likes it, however he's having some issues regarding read-only files. He's a doctor and frequently has to download word files to edit, however they always download as a read-only file. While this isn't particularly difficult to do, he finds doing it tiresome and because he isn't the most proficient PC user, may have difficulty with it when I return to school after the summer. I was hoping that there's some way to change the default settings so that all files downloaded are writeable.
Additionally, he has a number CD-RWs which he both retrieves files from and stores them to, however when trying to access these CDs he is told that they are read-only. Right clicking on the CD and trying to change the access permissions doesn't work (says that permissions can't be changed because the disc is read-only).
I am trying to write .pgm images using the O_DIRECT flag in open().I have a char* buffer which has the image data. I know that I have to align the buffers and have done that using posix_memalign() yet only a part of the image gets written.Has someone used O_DIRECT for writing files successfully?
View 1 Replies View RelatedThis is probably a pretty basic question seeing as I'm pretty new to Ubuntu Server. I'm running a simple website from my Ubuntu Server machine with The files are all stored in /var/www/ and then subdirectories. The problem is that when I add files through FTP I need to go and change all of the file permissions since by default they do not have read access so can't be accessed through a web browser on another machine.How can I make the default permissions readable for the directory and all new files that will be moved in it
View 5 Replies View RelatedWhat do the default file permissions in ubuntu 9.10 protect/deny access to?
View 9 Replies View RelatedIs there a way to revert to default permissions using chmod, for root filesystem? As root I accidentally chmod'd / to 755, luckily this is a dev server and not production so its not critical to fix for me, just wondering though....
View 2 Replies View RelatedI have a few websites that travel along with me in my usb stick, and I want to have read and write permisions to files on my usb by other users (i.e.: www-data) actually they have 0700. I'm running maverick (linux mint Julia).
View 1 Replies View RelatedFiles saved on our ubuntu server via samba server are all being created/saved as read only (-rwxr--r--). The users are MAC Users who are connecting via finder.I have taken 2 steps:First I added the lines "umask 0000" to the .bashrc files in the users' home directories.Second, I have modified the /etc/samba/smb.conf file such that I set "create mask = 0000" and also "directory mask = 0000" but the files are still being created as "-rwxr--r--".
View 1 Replies View Relatedthe permissions for my home directory were accidentally changed from 'access files' to 'create and delete files', and I changed them back, but ever since then I am not able to change any preferences/settings at all. power management, themes, panels, emerald, anything. my user account is supposed to be the administrator, and all the user privliges are checked. how to get control of my computer back?
View 9 Replies View RelatedI had used test desk program to restore my files ,the files that recovered was saved in home folderthe problem is that these files are become root permission only ,so i cantcopy , move theme
View 3 Replies View Relatedhow to match to find matches in two different files when comparing timestamps. The fields I'm wanting to match up are in the format:
Jul 26 09:33:02
I have tried reading the file line by line and using awk '{print $1,$2,$3}' which only gets and stores the timestamp in one of the files. I've been looking around and saw this example:
awk 'FNR==NR{!a[$3]++;next }{ b[$3]++ }
END{
for(i in a){
for(k in b){
if (a[i]==1 && i ~ k ) { print i }
}
}
}' $FILE $FILE2
Which sorta works but its way over my head at the moment. The two files can be found in your /var/log/syslog and /var/log/auth.log (using Ubuntu 11.04)
Reading and writing text files in C?
View 9 Replies View Related