Index: src/nautilus-burn-recorder.c
===================================================================
--- src/nautilus-burn-recorder.c	(revisión: 1974)
+++ src/nautilus-burn-recorder.c	(copia de trabajo)
@@ -363,6 +363,42 @@
 	return average;
 }
 
+gboolean command_can_write_drive (const char * command, NautilusBurnDrive * drive)
+{
+  gchar * program;
+  const char * device;
+  struct stat * program_stat = NULL;
+  struct stat * device_stat = NULL;
+  
+
+  g_return_val_if_fail (command != NULL, FALSE);
+  g_return_val_if_fail (drive != NULL, FALSE);
+
+  device = nautilus_burn_drive_get_device (drive);
+
+  program = g_find_program_in_path ((const gchar *)command);
+
+  /* If some error occured on stat, assumes it cannot write */
+  g_return_val_if_fail (!g_stat ((const gchar *)program, program_stat) &&
+                        !g_stat ((const gchar *)device, device_stat), FALSE);
+
+  g_return_val_if_fail (nautilus_burn_drive_device_write_ok (drive) == FALSE, TRUE);
+
+  /* Checks root owns the executable and have suid */
+  g_return_val_if_fail ((program_stat->st_uid == 0) && (device_stat->st_mode | (S_ISUID)),
+                        FALSE);
+
+  /* Checks owner of executable and device and suid */
+  g_return_val_if_fail ((program_stat->st_uid == device_stat->st_uid) &&
+                        (device_stat->st_mode | (S_IRUSR | S_IWUSR | S_ISUID)),
+                        FALSE);
+
+  g_return_val_if_fail ((program_stat->st_gid == device_stat->st_gid) &&
+                        (device_stat->st_mode | (S_IRGRP | S_IWGRP | S_ISGID)),
+                        FALSE);
+  return TRUE;
+}
+
 static gboolean
 cdrecord_stdout_line (NautilusBurnProcess   *process,
 		      const char            *line,
@@ -866,6 +902,7 @@
 	gboolean              can_rewrite;
 	gboolean              is_blank;
 	gboolean              is_locked;
+	gchar                 *command;
 	int                   ret;
 
 	g_return_val_if_fail (recorder != NULL, NAUTILUS_BURN_RECORDER_RESULT_ERROR);
@@ -912,6 +949,8 @@
 	}
 
 	if (cd_write_needs_growisofs (drive, type, tracks)) {
+		command = "growisofs";
+
 		ret = nautilus_burn_recorder_write_growisofs (recorder,
 							      drive,
 							      tracks,
@@ -919,6 +958,8 @@
 							      flags,
 							      error);
 	} else {
+		command = "cdrecord";
+
 		ret = nautilus_burn_recorder_write_cdrecord (recorder,
 							     drive,
 							     tracks,
@@ -927,6 +968,16 @@
 							     error);
 	}
 
+	if (!command_can_write_drive ((const char *)command, drive))
+	{  
+		g_set_error (error,
+				NAUTILUS_BURN_RECORDER_ERROR,
+				NAUTILUS_BURN_RECORDER_ERROR_GENERAL,
+				_("You have not permissions to burn drive"));
+
+		return NAUTILUS_BURN_RECORDER_RESULT_ERROR;
+	}
+
 	if (is_locked) {
 		nautilus_burn_drive_unlock (drive);
 	}
Index: src/nautilus-burn-drive.c
===================================================================
--- src/nautilus-burn-drive.c	(revisión: 1974)
+++ src/nautilus-burn-drive.c	(copia de trabajo)
@@ -284,6 +284,31 @@
 }
 
 /**
+ * nautilus_burn_drive_device_write_ok:
+ * @drive: #NautilusBurnDrive
+ *
+ * Report the whether the user has permission to drive
+ *
+ * Returns: %TRUE if the user can rewrite, otherwise return %FALSE.
+ *
+ * Since: 2.18
+ **/
+gboolean
+nautilus_burn_drive_device_write_ok (NautilusBurnDrive *drive)
+{
+	const char * device;
+
+	g_return_val_if_fail (drive != NULL, FALSE);
+
+	device = nautilus_burn_drive_get_device (drive);
+  
+	g_return_val_if_fail (g_access ((const gchar *)device, W_OK) == 0,
+                                  FALSE);
+
+	return TRUE;
+}
+
+/**
  * nautilus_burn_drive_can_rewrite:
  * @drive: #NautilusBurnDrive
  *
Index: src/nautilus-burn-drive.h
===================================================================
--- src/nautilus-burn-drive.h	(revisión: 1974)
+++ src/nautilus-burn-drive.h	(copia de trabajo)
@@ -128,6 +128,9 @@
 char *                nautilus_burn_drive_get_name_for_display     (NautilusBurnDrive       *drive);
 const char *          nautilus_burn_drive_get_device               (NautilusBurnDrive       *drive);
 
+gboolean              nautilus_burn_drive_device_write_ok          (NautilusBurnDrive       *drive);
+
+
 /* Capabilities */
 gboolean              nautilus_burn_drive_can_write                (NautilusBurnDrive       *drive);
 gboolean              nautilus_burn_drive_can_rewrite              (NautilusBurnDrive       *drive);
