General :: Change Security Context Of Only Directories?
Jul 4, 2011Is there a way I can change the security context of only the directories, & only files, recursively, in bash?
View 11 RepliesIs there a way I can change the security context of only the directories, & only files, recursively, in bash?
View 11 RepliesI receive messages such as the below:
SELinux is preventing /usr/sbin/httpd from using potentially mislabeled filesjk-runtime-status. SELinux has denied the httpd access to potentially mislabeled filesjk-runtime-status. This means that SELinux will not allow httpd to use these files. If httpd should be allowed this access to these files you should change the file context to one of the following types, httpd_tmp_t,
I know how to change the owner of a file and the permissions but what does it mean to change the file context?
What are the SElinux security context type & booleans in FTP/vsftpd
View 3 Replies View RelatedI try to install IPsec-Tools on Slackware 13, but I get an configure error: configure: error: Security Context requested, bu no selinux support! Aborting. I'm linux newbie and I'm following a slackware-basics tutorial, I did as in the tutorial, but the configure stops and aborts:
Code:
# CFLAGS="-O2 -march=i486 -mcpu=i686"
./configure --prefix=/usr
--sysconfdir=/etc
--localstatedir=/var
[Code]...
What can I do? How can I enable/install selinux support? I guess it's related with AH and ESP protocols, which in my kernel are defined as modules (m). If so, how can I enable them?
Is it possible to change only directories access permissions recursively with some linux command. I need to set x (access) permissions on directories but not execute on files. [URL]
chmod - change file access permissions
-R, --recursive
change files and directories recursively
i have an ntfs mount that i wish to change permissions of individual directories.i have mounted many ntfs volumes successfully, mounting is not the issue. the issue is that when mounting, i need to specify 'blanket' permissions, owner, group etc. i have no idea how to change permissions for individual folders.
View 2 Replies View RelatedI'm attempting to get MapServer running on my Fedora 13 computer. I was able to install with the package manager, and the executable (mapserv) was originally placed in /usr/sbin. But I need it in /var/www/cgi-bin to work on the webserver. So I copied the file to the right location. Unfortunately, it doesn't have the correct SELinux context. Here's the message from the troubleshooter:
SELinux denied access requested by /var/www/cgi-bin/mapserv. /var/www/cgi-bin/mapserv is mislabeled. /var/www/cgi-bin/mapserv default type is httpd_sys_script_exec_t, but its current type is httpd_sys_script_exec_t. Changing this file back to the default type, may fix your problem.
How's that for circular logic? Does anyone have an idea what the correct SELinux context for a cgi-bin executable might be?
After entering the gdm I'm being asked "Would you like to enter a Security Context [N]?" during login. I've had a look around online but can find nothing final about this.
View 1 Replies View RelatedI reset the security context for my cgi-bin to httpd_sys_content_t.How do I set it back to the proper context?
View 1 Replies View Relatedhow could i change the context menu of any program?i want to create special context menu for each program that each one has its own context menu that doesn't look like the other program.how could i do that?
View 1 Replies View RelatedI'm suspicious that the context of /etc/sudoers is wrong. During the last upgrade to Fedora 14, RPM dropped /etc/sudoers.rpmnew, which had a different context than the real sudoers file. But, when I try to get SELinux to relabel the file (using restorecon or fixfiles), it refuses to make a change.
> ls -lZ /etc/sudoers
-r--r-----. root root unconfined_u:object_r:etc_t:s0 /etc/sudoers
> matchpathcon /etc/sudoers
[code]....
i am in need of linux help. iam at college and i need this back/restore script to pass this final part of an assessment. i require a backup script that will not only backup but also restore files to the relevent directories. e.g. users are instructed to store all wordprocessor files in a directory named wp. so i am needing to create a backup directory and 3 directories within that and some files within the 3 directories and then back them up ot restore them. l know i should/have to do this myself by been trying to get/understand info for the last few days and came up with zero.
View 14 Replies View RelatedI want to make a webserver with multiple users allowed to login through SFTP to a specific folder, www.Multiple users are added, lets say user1 and user2, and all of them belonging to the www-data group. The www directory has an owner www-data and a group www-data.
I have used chmod -R 775 on the www folder, but after I try to create a folder test through my SFTP server (using Filezilla) the group of the directory created has only r and x permissions, and I am not able to log in with the second user user2 and create a directory within www/test due to a lack of w permission to the group.
I also tried using chmod 2775 on www directory, but without luck. Can somebody explain to me, how can I make it so that a newly created directory inherits the root directory group permissions?
Why do I have an empty directory in the top of my filesystem labeled "cgroup" that goes by the file context above?And why does it apply to all files "/cgroup(/.*)?" as per a fcontext search?Did something break or is this the result of a new update?
View 2 Replies View RelatedI am writing a script, in that my requirement is, if all the fill types stored in one directory from that we need to separate different different directories based on the file types.
for example in a directory(anish). 5 different types files
1- directory
2- .txt files
2- .sh files
like that and my requirement is the (1- directory is moved to one new directory(dir) which we are given in the script)and (2 .txt files are moved to another new directory(test) which we are given in the script)and ( 2 .sh files are moved to another new directory(bash) which we are given in the scrip)finally the directory anish should be empty..using bash script.how it is possible !!
The script "vsftpd_virtualuser_add.sh" from the guide here:
http://wiki.centos.org/HowTos/Chroot_Vsftpd_with_non-system_users
executes the following line: /usr/bin/chcon -t public_content_rw_t $HOMEDIR/$USERNAME
which returns the error: /usr/bin/chcon: couldn't compute security context from unlabeled
Login attempts are unsuccessful on the given username.I followed the instructions on that page verbatim.I can't find anything useful on that error anywhere - even outside of vsftpd context.This is a new CentOS 5.5 server - updated everything with yum.VSFTP worked fine on the last server, which was a CentOS 5.x.
I have openSUSE 11.3. I logged in as root in the konsole and I can't change the directories in the home folder, for example I write "cd /home/java" and I get "No such file or directory" (and the directory exists).Also I can't copy or paste anything in the folders in "Root" from the GUI.
View 9 Replies View RelatedI tried the cd command the way it ussualy works and nothing , Im new to fedora is there something else to it
View 4 Replies View RelatedSince I have my mp3s on a windows directory (C:UsersmagodiafanoMusic) I used to create a link in order to have a direct access to this directory from the ubuntu's desktop. The problem is that everytime I log into the pc, the link does not work anymore as if the position of the directory was changed. So I have a lot of problems with the library of rhythmbox too. What is my error?
View 9 Replies View RelatedI have my own dedicated server box running (using it for game servers). I access it via ssh and I have root control of it. It has FEDORA Operating System. I wanna give FTP control of different directories to different users. Right now there are no other FTP users except root. I have installed vsftpd and dont know what should I do next? How do I add users (who can read/write/delete files) and How do I restrict them to their home directory?
Here is what I want:
username:client1
password:12345
home directory: home/server1
username:client2
password:12345
home directory: home/server2
i have installed linux4 on vmware and now i am to copy any file but not able to paste it in any directories and when check the permissions there is no write permission for any of the directories .Not able to use chmod to change the directories permissions.
View 4 Replies View RelatedI am trying to set up Protected Web Directories on my server Fedora8 32bit I have webmin 1.5 and there is Protected Web Directories option, so I follow instructions and setting up all what is asked, in dir what I need to protect shows up 2 files:
[Code]...
Is there a way to restrict users that are logged into the shell via SSH/Telnet/SFTP from using the 'cd' command to move into certain directories, yet not use the chmod command to do it? For instance, restrict users logged in from accessing the /var/www/ folder but have it still accessible using a web browser. Also, would this defeat the purpose since they could just wget from it if its still web accessible through a browser?
View 8 Replies View RelatedIs there a way to encrypt existing home directories in lucid so that they will unlock with pam-encfs when the user logs in? Or must you do this when the directory is created?
View 1 Replies View RelatedI was running '# ls -l' in '/' directory and I noticed all directories in '/' have the following permeation 'drwxr-xr-x' [except root's home which is 'drwx------' (after I change it from 'drwxr-xr-x' )]
I don't want all the user (except root) to be able to read and execute (in) any directory, I just want every user to be abel to read/write/execute only in his/her home directory.
my question is, is it ok to change file and directory permeation of the following directories in '/' from 'drwxr-xr-x' to 'drwxr-x---' or 'drwx------' recursively?
/bin
/boot
/dev
/etc
[Code]....
-I and the other users use the pc for internet, open office and email mainly.
-It does not run server(s) like smb/cif or NFS.
-There are 5 usernames (created by me, non of them are superusers) in th pc, only one user is required to login at any one time.
I suppose that my main Linux user account password serves as my SSH password as well. Is there a way I can modify this? As it turns out, I'd like to have a REALLY secure SSH password for obvious reasons, but a less secure local password, as it makes typing in passwords a heck of a lot easier on a machine. Is there a way I can change my account password in SSH without changing my Linux user password?
View 2 Replies View RelatedI ran a chkrootkit scan and found this: The following suspicious files and directories were found: /usr/lib/pymodules/python2.6/.path /usr/lib/xulrunner-1.9.2.8/.autoreg /usr/lib/firefox 3.6.8/.autoreg /usr/lib/jvm/.java-6-openjdk.jinfo
How do I get rid of this suspicious file?
I can't write to directories inside my main file system. This is annoying, how to change?
View 3 Replies View RelatedI've got a samba share on a linux server, connecting to it with a windows 2k3 server via tools > map network drive. The goal is to be able to use windows to change the security of the samba share. The good news is it works! The bad news is it's not QUITE perfect:
The share is called /company. I started with the following to give everyone access to everything, set the owner of the share to administrator (my domain admin on the Windows domain), and set the group owner to domain users (group that everyone on the domain is part of):
Code:
chmod -R 777 /company
chown -R administrator /company
chgrp -R domain users /company
I then mapped the drive as a regular user, and of course, can access/modify/delete/rename/create anything I want. Then I picked a folder to lock down. Let's call it /company/myFolder. I did this on the Windows server by mapping the drive as administrator (the owner), right click > properties > security tab > advanced > highlight "domain users" and "everyone" and click edit > clear all (i.e. remove all access). Go back to Linux and
[Code]..
The only issue that remains is that I am able to rename/delete "myFolder" as a regular user. I thought this was coming from the "acl map full control = true" parameter in smb.conf, but I changed it to false and verified the change and it still happens. If I remove group and world write access to /company, I am no longer allowed to rename/delete myFolder, but then I can't create a new folder. If I add group write access back in I can create files but can also rename/delete folders within /company that have --- specified for group access. Any ideas what I need to tweak to make this right?
I have a vary unique problem with file and directory ownership. I need to change the ownership of multiple files and directories under a specific subdirectory.Under this directory structure there are files and directories owned my different users and groups. I need to change all files and directories owned by "user1" to "user2". but if any are owned by "user3" I need those left alone.Is there a simple way to do this or will I need to traverse the structure and change things one at a time.
View 3 Replies View Related